Skip to content

Commit

Permalink
fix(demuxer): avoid access null mCtx->pb
Browse files Browse the repository at this point in the history
  • Loading branch information
skufly committed Mar 19, 2020
1 parent 7e8fcc6 commit 71f6d80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/demuxer/avFormatDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ namespace Cicada {
err = av_read_frame(mCtx, pkt);

if (err < 0) {
if (err != AVERROR(EAGAIN) && mCtx->pb->error != AVERROR_EXIT) {
if (mCtx->pb) {
if (err != AVERROR(EAGAIN)) {
if (mCtx->pb && mCtx->pb->error != AVERROR_EXIT) {
av_log(NULL, AV_LOG_WARNING, "%s:%d: %s, ctx->pb->error=%d\n", __FILE__, __LINE__, getErrorString(err),
mCtx->pb->error);
}
Expand Down

0 comments on commit 71f6d80

Please sign in to comment.