diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-10 16:29:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-10 16:29:51 +0200 |
commit | a9aa88df1d8bdef7a3ba520e285c6c5b639d5fd5 (patch) | |
tree | ad58a7f68309b31b07d54564879e4f60ffdeac88 /libavcodec/h264_refs.c | |
parent | e2cc3311246376e902f0defc6c57bd554babcf39 (diff) | |
parent | 7221139ba0486c24afeac1f41ba97c75f58046b9 (diff) | |
download | ffmpeg-a9aa88df1d8bdef7a3ba520e285c6c5b639d5fd5.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavc: make avcodec_init() static on next bump.
ac3enc: remove unneeded #include
ac3enc: restructure coupling coordinate reuse calculation
ac3enc: allow new coupling coordinates to be sent independently for each channel.
ac3enc: separate exponent bit counting from exponent grouping.
h264: propagate error return values for AV_LOG_ERROR-triggering events
aac: Don't attempt to output configure an invalid channel configuration.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r-- | libavcodec/h264_refs.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 6794bf3c9f..f61ad5bfdd 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -499,7 +499,7 @@ void ff_generate_sliding_window_mmcos(H264Context *h) { int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ MpegEncContext * const s = &h->s; int i, av_uninit(j); - int current_ref_assigned=0; + int current_ref_assigned=0, err=0; Picture *av_uninit(pic); if((s->avctx->debug&FF_DEBUG_MMCO) && mmco_count==0) @@ -518,6 +518,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ if(mmco[i].opcode != MMCO_SHORT2LONG || !h->long_ref[mmco[i].long_arg] || h->long_ref[mmco[i].long_arg]->frame_num != frame_num) av_log(h->s.avctx, AV_LOG_ERROR, "mmco: unref short failure\n"); + err = AVERROR_INVALIDDATA; continue; } } @@ -609,10 +610,12 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ "assignment for second field " "in complementary field pair " "(first field is long term)\n"); + err = AVERROR_INVALIDDATA; } else { pic= remove_short(h, s->current_picture_ptr->frame_num, 0); if(pic){ av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term buffer state detected\n"); + err = AVERROR_INVALIDDATA; } if(h->short_ref_count) @@ -634,6 +637,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ "number of reference frames (%d+%d) exceeds max (%d; probably " "corrupt input), discarding one\n", h->long_ref_count, h->short_ref_count, h->sps.ref_frame_count); + err = AVERROR_INVALIDDATA; if (h->long_ref_count && !h->short_ref_count) { for (i = 0; i < 16; ++i) @@ -650,7 +654,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){ print_short_term(h); print_long_term(h); - return 0; + return err; } int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb){ |