aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-09-01 14:33:54 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-09-01 14:33:54 +0000
commit2988c93d94d857da609f366db82b624a91ff9b4c (patch)
tree9038c03b1a91bc622d73463bea80e18f7fb2718a /libavcodec
parent5f86057ffd534abb42fada9f0abf88409f6b51d2 (diff)
downloadffmpeg-2988c93d94d857da609f366db82b624a91ff9b4c.tar.gz
create a separate codec_id for E-AC-3
Originally committed as revision 15143 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aac_ac3_parser.c3
-rw-r--r--libavcodec/ac3_parser.c2
-rw-r--r--libavcodec/ac3dec.c13
-rw-r--r--libavcodec/ac3enc.c2
-rw-r--r--libavcodec/allcodecs.c1
-rw-r--r--libavcodec/avcodec.h3
6 files changed, 19 insertions, 5 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index cfb1a222be..d0c912a606 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -76,7 +76,8 @@ get_next:
avctx->request_channels < s->channels &&
(avctx->request_channels <= 2 ||
(avctx->request_channels == 1 &&
- avctx->codec_id == CODEC_ID_AC3))) {
+ (avctx->codec_id == CODEC_ID_AC3 ||
+ avctx->codec_id == CODEC_ID_EAC3)))) {
avctx->channels = avctx->request_channels;
} else {
avctx->channels = s->channels;
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index b9a25abc42..aedcbcd472 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -188,7 +188,7 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1)
AVCodecParser ac3_parser = {
- { CODEC_ID_AC3 },
+ { CODEC_ID_AC3, CODEC_ID_EAC3 },
sizeof(AACAC3ParseContext),
ac3_parse_init,
ff_aac_ac3_parse,
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 1432ff05a0..1a22126d8c 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1288,5 +1288,16 @@ AVCodec ac3_decoder = {
.init = ac3_decode_init,
.close = ac3_decode_end,
.decode = ac3_decode_frame,
- .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 (AC-3, E-AC-3)"),
+ .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
+};
+
+AVCodec eac3_decoder = {
+ .name = "eac3",
+ .type = CODEC_TYPE_AUDIO,
+ .id = CODEC_ID_EAC3,
+ .priv_data_size = sizeof (AC3DecodeContext),
+ .init = ac3_decode_init,
+ .close = ac3_decode_end,
+ .decode = ac3_decode_frame,
+ .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
};
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index e0f17c2415..434869cee9 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1365,5 +1365,5 @@ AVCodec ac3_encoder = {
AC3_encode_close,
NULL,
.sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
- .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 (AC-3, E-AC-3)"),
+ .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
};
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 8be683a027..5694282270 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -189,6 +189,7 @@ void avcodec_register_all(void)
REGISTER_DECODER (COOK, cook);
REGISTER_DECODER (DCA, dca);
REGISTER_DECODER (DSICINAUDIO, dsicinaudio);
+ REGISTER_DECODER (EAC3, eac3);
REGISTER_ENCDEC (FLAC, flac);
REGISTER_DECODER (IMC, imc);
REGISTER_DECODER (MACE3, mace3);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index e333841fd0..4c4437615f 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 51
-#define LIBAVCODEC_VERSION_MINOR 70
+#define LIBAVCODEC_VERSION_MINOR 71
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -306,6 +306,7 @@ enum CodecID {
CODEC_ID_WMAPRO,
CODEC_ID_WMALOSSLESS,
CODEC_ID_ATRAC3P,
+ CODEC_ID_EAC3,
/* subtitle codecs */
CODEC_ID_DVD_SUBTITLE= 0x17000,