[FFmpeg-devel] [PATCH]Silence a warning for one sample from ticket 973
Carl Eugen Hoyos
cehoyos at ag.or.at
Mon Feb 6 01:35:54 CET 2012
Hi!
Attached trial-and-error patch does not break pink.mpg (issue 1046), but
silences the error messages for the first sample in ticket #973, decoding is
unchanged.
Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 1dae17f..760ea35 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1496,7 +1496,7 @@ static int load_matrix(MpegEncContext *s, uint16_t matrix0[64], uint16_t matrix1
av_log(s->avctx, AV_LOG_ERROR, "matrix damaged\n");
return -1;
}
- if (intra && i == 0 && v != 8) {
+ if (s->chroma_format < 2 && intra && i == 0 && v != 8) {
av_log(s->avctx, AV_LOG_ERROR, "intra matrix invalid, ignoring\n");
v = 8; // needed by pink.mpg / issue1046
}
More information about the ffmpeg-devel
mailing list