Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-24 16:51:51 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-08-24 17:00:39 +0400
commit15a0fb58a3294876c23989915a4a6202411be1b0 (patch)
tree06270e6af9c4d446b75a573b39161664e60c6a13 /libavcodec/utvideodec.c
parentbec180e1127f6753b5af1e6e5242020e0de12366 (diff)
parent01cb4c84f54a52725c9b4b4dd6c609c36cccc5d4 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: utvideodec: Fix single symbol mode decoding truespeech: drop useless casts libavcodec: drop bogus dependencies from mpc[78] and qdm2 mpegaudio: move ff_mpa_enwindow to a separate file AVOptions: store defaults for INT64 options in int64 union member. Conflicts: libavcodec/Makefile libavfilter/af_asyncts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utvideodec.c')
-rw-r--r--libavcodec/utvideodec.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 1bd38dca3e..d08d6e8b95 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -134,12 +134,9 @@ static int decode_plane(UtvideoContext *c, int plane_no,
slice_size = slice_data_end - slice_data_start;
if (!slice_size) {
- for (j = sstart; j < send; j++) {
- for (i = 0; i < width * step; i += step)
- dest[i] = 0x80;
- dest += stride;
- }
- continue;
+ av_log(c->avctx, AV_LOG_ERROR, "Plane has more than one symbol "
+ "yet a slice has a length of zero.\n");
+ goto fail;
}
memcpy(c->slice_bits, src + slice_data_start + c->slices * 4,
@@ -359,7 +356,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
for (j = 0; j < c->slices; j++) {
slice_end = bytestream2_get_le32u(&gb);
slice_size = slice_end - slice_start;
- if (slice_end <= 0 || slice_size <= 0 ||
+ if (slice_end < 0 || slice_size < 0 ||
bytestream2_get_bytes_left(&gb) < slice_end) {
av_log(avctx, AV_LOG_ERROR, "Incorrect slice size\n");
return AVERROR_INVALIDDATA;