[FFmpeg-cvslog] mpeg12dec: check uppercased codec_tag.

Michael Niedermayer git at videolan.org
Sat Jan 14 20:12:02 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 14 18:38:35 2012 +0100| [0d5c810bd59abed01f8e70ee956897599eaaea25] | committer: Michael Niedermayer

mpeg12dec: check uppercased codec_tag.

We do this for all other codec_tag checks in mpegvideo*/h26*
doing it here too makes the code more consistent.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d5c810bd59abed01f8e70ee956897599eaaea25
---

 libavcodec/mpeg12.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 2677713..831ea92 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -2268,7 +2268,8 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
             return buf_size;
     }
 
-    if (s->mpeg_enc_ctx_allocated == 0 && avctx->codec_tag == AV_RL32("VCR2"))
+    s2->codec_tag = avpriv_toupper4(avctx->codec_tag);
+    if (s->mpeg_enc_ctx_allocated == 0 &&    s2->codec_tag == AV_RL32("VCR2"))
         vcr2_init_sequence(avctx);
 
     s->slice_count = 0;



More information about the ffmpeg-cvslog mailing list