At least in this case, MPlayer seems to look at the codec tag rather
than the codec ID in order to determine the codec. Therefore, the
'fourcc' variable needs to be set to 'SVQ3' as well, which is later
copied to st->codec->codec_tag in matroskadec.c.

Mats

--
Mats Peterson
http://matsp888.no-ip.org/~mats/
>From 5a515ebc38a821e9312c4b7a62db210cf66488a2 Mon Sep 17 00:00:00 2001
From: Mats Peterson <matsp...@yahoo.com>
Date: Wed, 6 Jan 2016 04:16:32 +0100
Subject: [PATCH] lavf/matroskadec: SMI to SVQ3

At least in this case, MPlayer seems to look at the codec tag rather
than the codec ID in order to determine the codec. Therefore, the
'fourcc' variable needs to be set to 'SVQ3' as well, which is later
copied to st->codec->codec_tag in matroskadec.c.

Mats

---
 libavformat/matroskadec.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 440c9f9..d9d87cc 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1887,8 +1887,10 @@ static int matroska_parse_tracks(AVFormatContext *s)
                 fourcc   = AV_RL32(track->codec_priv.data);
                 codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc);
             }
-            if (codec_id == AV_CODEC_ID_NONE && AV_RL32(track->codec_priv.data+4) == AV_RL32("SMI "))
-                codec_id = AV_CODEC_ID_SVQ3;
+            if (codec_id == AV_CODEC_ID_NONE && AV_RL32(track->codec_priv.data+4) == AV_RL32("SMI ")) {
+                fourcc = MKTAG('S','V','Q','3');
+                codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc);
+            }
             if (codec_id == AV_CODEC_ID_NONE) {
                 char buf[32];
                 av_get_codec_tag_string(buf, sizeof(buf), fourcc);
-- 
1.7.10.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to