[FFmpeg-cvslog] avformat: allow .ec3 as extension for raw E-AC-3 stream

Ruben Gonzalez git at videolan.org
Mon Aug 8 17:27:02 EEST 2022


ffmpeg | branch: master | Ruben Gonzalez <rgonzalez at fluendo.com> | Thu Jun 23 14:14:36 2022 +0200| [2d8d7f859216dbddcb72ad2cba9d5e8489304e32] | committer: Anton Khirnov

avformat: allow .ec3 as extension for raw E-AC-3 stream

In addition to .eac3, .ec3 is also commonly used by people to name raw
E-AC-3 streams. Enables automatic recognition of the eac3 format for
the .ac3 extension.

For instance Dolby Digital Plus software only support files with
.ec3. Files with .eac3 are not supported. Check issue #18 in the
public dlb_mp4base repository from DolbyLaboratories.

Signed-off-by: Ruben Gonzalez <rgonzalez at fluendo.com>
Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavformat/ac3dec.c | 2 +-
 libavformat/rawenc.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/ac3dec.c b/libavformat/ac3dec.c
index 51461befd8..989d126a81 100644
--- a/libavformat/ac3dec.c
+++ b/libavformat/ac3dec.c
@@ -131,7 +131,7 @@ const AVInputFormat ff_eac3_demuxer = {
     .read_header    = ff_raw_audio_read_header,
     .read_packet    = ff_raw_read_partial_packet,
     .flags          = AVFMT_GENERIC_INDEX,
-    .extensions     = "eac3",
+    .extensions     = "eac3,ec3",
     .raw_codec_id   = AV_CODEC_ID_EAC3,
     .priv_data_size = sizeof(FFRawDemuxerContext),
     .priv_class     = &ff_raw_demuxer_class,
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 26099cb1c1..267fce252d 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -252,7 +252,7 @@ const AVOutputFormat ff_eac3_muxer = {
     .name              = "eac3",
     .long_name         = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
     .mime_type         = "audio/x-eac3",
-    .extensions        = "eac3",
+    .extensions        = "eac3,ec3",
     .audio_codec       = AV_CODEC_ID_EAC3,
     .video_codec       = AV_CODEC_ID_NONE,
     .init              = force_one_stream,



More information about the ffmpeg-cvslog mailing list