Commit 663ebae7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '56daf10e'

* commit '56daf10e':
  mov: use the format context for logging.
  flicvideo: avoid an infinite loop in byte run compression
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents ea2de3d0 56daf10e
...@@ -387,6 +387,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx, ...@@ -387,6 +387,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
if (bytestream2_tell(&g2) + 1 > stream_ptr_after_chunk) if (bytestream2_tell(&g2) + 1 > stream_ptr_after_chunk)
break; break;
byte_run = sign_extend(bytestream2_get_byte(&g2), 8); byte_run = sign_extend(bytestream2_get_byte(&g2), 8);
if (!byte_run) {
av_log(avctx, AV_LOG_ERROR, "Invalid byte run value.\n");
return AVERROR_INVALIDDATA;
}
if (byte_run > 0) { if (byte_run > 0) {
palette_idx1 = bytestream2_get_byte(&g2); palette_idx1 = bytestream2_get_byte(&g2);
CHECK_PIXEL_PTR(byte_run); CHECK_PIXEL_PTR(byte_run);
......
...@@ -835,7 +835,7 @@ static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -835,7 +835,7 @@ static int mov_read_mdhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
version = avio_r8(pb); version = avio_r8(pb);
if (version > 1) { if (version > 1) {
av_log_ask_for_sample(c, "unsupported version %d\n", version); av_log_ask_for_sample(c->fc, "unsupported version %d\n", version);
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }
avio_rb24(pb); /* flags */ avio_rb24(pb); /* flags */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment