aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-12-01 12:02:21 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-12-01 12:02:21 +0100
commit4ba90392bca096104d86d858a0dc87956bfe0794 (patch)
tree8493c6120bec8f34000cafaa6eb074073d3561ab /libavformat/mpeg.c
parentf068aed7b8d7eac31da22d88f359e9b844c04b47 (diff)
downloadandroid_external_ffmpeg-4ba90392bca096104d86d858a0dc87956bfe0794.tar.gz
android_external_ffmpeg-4ba90392bca096104d86d858a0dc87956bfe0794.tar.bz2
android_external_ffmpeg-4ba90392bca096104d86d858a0dc87956bfe0794.zip
Support AC-3 in Sega Dreamcast Sofdec files.
Fixes ticket #3184
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 1ea58d5ed5..90434a1437 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;