Skip to content

Commit

Permalink
fix(avformatdemuxer): reset the avio status after interrupt
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Apr 2, 2020
1 parent de8f08c commit 29e3857
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion framework/demuxer/avFormatDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ namespace Cicada {
}

if (mCtx->pb && mCtx->pb->error == FRAMEWORK_ERR_EXIT) {
mCtx->pb->error = 0;
av_packet_free(&pkt);
return FRAMEWORK_ERR_EXIT;
}
Expand Down Expand Up @@ -466,6 +465,10 @@ namespace Cicada {
if (mInterruptCb) {
mInterruptCb(mUserArg, 0);
}
if(mCtx->pb->error < 0) {
mCtx->pb->error = 0;
avio_feof(mCtx->pb);
}

mPacketQueue.clear();
mError = 0;
Expand Down

0 comments on commit 29e3857

Please sign in to comment.