Skip to content

Commit

Permalink
avformat: allow .ec3 as extension for raw E-AC-3 stream
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Anton Khirnov <[email protected]>
  • Loading branch information
rgonzalezfluendo authored and elenril committed Aug 8, 2022
1 parent 68e017c commit 2d8d7f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libavformat/ac3dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion libavformat/rawenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2d8d7f8

Please sign in to comment.