summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-11-29 14:31:40 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-11-29 14:31:40 +0000
commitaeaef4ed63fcf03cf9b39fd8950829e72fdf07fb (patch)
tree63d15fd0725274f852db2e8448e8d3992d5558da /libavcodec/mpeg12.c
parentbd2837387c76327656971513ba335c7e9920e290 (diff)
Print errors instead of just ignoring contradictionary values in mpeg2 silently.
Originally committed as revision 20656 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index d7e5f4167a..74b8eea869 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1545,10 +1545,18 @@ static void mpeg_decode_picture_coding_extension(Mpeg1Context *s1)
s->chroma_420_type = get_bits1(&s->gb);
s->progressive_frame = get_bits1(&s->gb);
- if(s->progressive_sequence)
+ if(s->progressive_sequence && !s->progressive_frame){
s->progressive_frame= 1;
- if(s->progressive_frame){
+ av_log(s->avctx, AV_LOG_ERROR, "interlaced frame in progressive sequence, ignoring\n");
+ }
+
+ if(s->picture_structure==0 || (s->progressive_frame && s->picture_structure!=PICT_FRAME)){
+ av_log(s->avctx, AV_LOG_ERROR, "picture_structure %d invalid, ignoring\n", s->picture_structure);
s->picture_structure= PICT_FRAME;
+ }
+
+ if(s->progressive_frame && !s->frame_pred_frame_dct){
+ av_log(s->avctx, AV_LOG_ERROR, "invalid frame_pred_frame_dct\n");
s->frame_pred_frame_dct= 1;
}