aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/flashsv.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-30 14:49:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-30 14:49:13 +0100
commitdb29a7c7c2822a2f2e9804988e279a9fe7d88c11 (patch)
tree04fb612effd1e808baf292466197027e8b68b924 /libavcodec/flashsv.c
parent8119d8b01f8391f11c447802782e9017ad419d99 (diff)
parent9d46eaec7a90bd8f5cd9e45398c6d17804182320 (diff)
downloadffmpeg-db29a7c7c2822a2f2e9804988e279a9fe7d88c11.tar.gz
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/flashsv.c')
-rw-r--r--libavcodec/flashsv.c5
1 files changed, 5 insertions, 0 deletions
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
}