diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-30 17:49:13 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-30 17:49:13 +0400 |
commit | db29a7c7c2822a2f2e9804988e279a9fe7d88c11 (patch) | |
tree | 04fb612effd1e808baf292466197027e8b68b924 /libavcodec | |
parent | 8119d8b01f8391f11c447802782e9017ad419d99 (diff) | |
parent | 9d46eaec7a90bd8f5cd9e45398c6d17804182320 (diff) |
Merge commit '9d46eaec7a90bd8f5cd9e45398c6d17804182320'
* commit '9d46eaec7a90bd8f5cd9e45398c6d17804182320':
build: The FLAC encoder also depends on the flacdsp code
img2: K&R formatting cosmetics
h264: check context state before decoding slice data partitions
flashsv: make sure data for zlib priming is available
Conflicts:
libavcodec/Makefile
libavformat/img2.c
libavformat/img2dec.c
libavformat/img2enc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/Makefile | 2 | ||||
-rw-r--r-- | libavcodec/flashsv.c | 5 | ||||
-rw-r--r-- | libavcodec/h264.c | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile index d8057117d4..1d4cb594dc 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -193,7 +193,7 @@ OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o flacdsp.o -OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o vorbis_data.o +OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o flacdsp.o vorbis_data.o OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 1b65ecf6d1..533e9f0f37 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -403,6 +403,11 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data, av_log_missing_feature(avctx, "zlibprime_curr", 1); return AVERROR_PATCHWELCOME; } + if (!s->blocks && (s->zlibprime_curr || s->zlibprime_prev)) { + av_log(avctx, AV_LOG_ERROR, "no data available for zlib " + "priming\n"); + return AVERROR_INVALIDDATA; + } size--; // account for flags byte } diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 14843cf24e..abed3649f9 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3989,6 +3989,7 @@ again: if (hx->redundant_pic_count == 0 && hx->intra_gb_ptr && hx->s.data_partitioning && + s->current_picture_ptr && s->context_initialized && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc) && (avctx->skip_frame < AVDISCARD_BIDIR || |