Skip to content

Commit

Permalink
improvement(mediaplayer): fix demuxer set SourceConfig logic
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed May 14, 2020
1 parent 5c86ed6 commit d57ce88
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mediaPlayer/SuperMediaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3386,12 +3386,9 @@ namespace Cicada {

if (!noFile) {
mDemuxerService->SetDataCallBack(mBSReadCb, mBSCbArg, mBSSeekCb, mBSCbArg, nullptr);
} else {
IDataSource::SourceConfig config;
mDataSource->Get_config(config);
mDemuxerService->getDemuxerHandle()->setDataSourceConfig(config);
}


//prepare之前seek
if (mSeekPos > 0) {
mDemuxerService->Seek(mSeekPos, 0, -1);
Expand All @@ -3410,6 +3407,11 @@ namespace Cicada {
#else
mDemuxerService->getDemuxerHandle()->setBitStreamFormat(true, true);
#endif
if (noFile) {
IDataSource::SourceConfig config;
mDataSource->Get_config(config);
mDemuxerService->getDemuxerHandle()->setDataSourceConfig(config);
}
}

//step2: Demuxer init and getstream index
Expand Down

0 comments on commit d57ce88

Please sign in to comment.