[FFmpeg-cvslog] Only skip MLP header in mpeg files if the codec actually is MLP.

Carl Eugen Hoyos git at videolan.org
Thu Jan 17 17:46:07 CET 2013


ffmpeg | branch: release/1.0 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Jan 17 17:19:08 2013 +0100| [c287efcc447917ea89d908204df343e265f62d31] | committer: Carl Eugen Hoyos

Only skip MLP header in mpeg files if the codec actually is MLP.

Fixes PCM audio in Kansas Pheasant Hunt 2000 mpg file.
Reported-by: Mashiat Sarker Shakkhar
(cherry picked from commit ad406f7e402977cb7dbc78ccb63e21c137f6699e)

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

 libavformat/mpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 54125ae..38629c2 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -497,7 +497,7 @@ static int mpegps_read_packet(AVFormatContext *s,
     if(st->discard >= AVDISCARD_ALL)
         goto skip;
     if (startcode >= 0xa0 && startcode <= 0xaf) {
-      if (lpcm_header_len == 6) {
+      if (lpcm_header_len == 6 && st->codec->codec_id == AV_CODEC_ID_MLP) {
             if (len < 6)
                 goto skip;
             avio_skip(s->pb, 6);



More information about the ffmpeg-cvslog mailing list