[FFmpeg-cvslog] Support AC-3 in Sega Dreamcast Sofdec files.

Carl Eugen Hoyos git at videolan.org
Sun Dec 1 13:14:19 CET 2013


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sun Dec  1 12:02:21 2013 +0100| [4ba90392bca096104d86d858a0dc87956bfe0794] | committer: Carl Eugen Hoyos

Support AC-3 in Sega Dreamcast Sofdec files.

Fixes ticket #3184

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

 libavformat/mpeg.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 1ea58d5..90434a1 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -521,7 +521,13 @@ static int mpegps_read_packet(AVFormatContext *s,
         codec_id = AV_CODEC_ID_DVD_NAV;
     } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
         type = AVMEDIA_TYPE_AUDIO;
-        codec_id = m->sofdec > 0 ? AV_CODEC_ID_ADPCM_ADX : AV_CODEC_ID_MP2;
+        if (m->sofdec > 0) {
+            codec_id = AV_CODEC_ID_ADPCM_ADX;
+            // Auto-detect AC-3
+            request_probe = 50;
+        } else {
+            codec_id = AV_CODEC_ID_MP2;
+        }
     } else if (startcode >= 0x80 && startcode <= 0x87) {
         type = AVMEDIA_TYPE_AUDIO;
         codec_id = AV_CODEC_ID_AC3;



More information about the ffmpeg-cvslog mailing list