Mercurial > libavcodec.hg
changeset 7769:e5f7a43f63ae libavcodec
create a separate codec_id for E-AC-3
author | jbr |
---|---|
date | Mon, 01 Sep 2008 14:33:54 +0000 |
parents | 152573e499c9 |
children | 3d1ffb62e933 |
files | aac_ac3_parser.c ac3_parser.c ac3dec.c ac3enc.c allcodecs.c avcodec.h |
diffstat | 6 files changed, 19 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/aac_ac3_parser.c Mon Sep 01 11:19:26 2008 +0000 +++ b/aac_ac3_parser.c Mon Sep 01 14:33:54 2008 +0000 @@ -76,7 +76,8 @@ 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;
--- a/ac3_parser.c Mon Sep 01 11:19:26 2008 +0000 +++ b/ac3_parser.c Mon Sep 01 14:33:54 2008 +0000 @@ -188,7 +188,7 @@ AVCodecParser ac3_parser = { - { CODEC_ID_AC3 }, + { CODEC_ID_AC3, CODEC_ID_EAC3 }, sizeof(AACAC3ParseContext), ac3_parse_init, ff_aac_ac3_parse,
--- a/ac3dec.c Mon Sep 01 11:19:26 2008 +0000 +++ b/ac3dec.c Mon Sep 01 14:33:54 2008 +0000 @@ -1288,5 +1288,16 @@ .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)"), +};
--- a/ac3enc.c Mon Sep 01 11:19:26 2008 +0000 +++ b/ac3enc.c Mon Sep 01 14:33:54 2008 +0000 @@ -1365,5 +1365,5 @@ 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)"), };
--- a/allcodecs.c Mon Sep 01 11:19:26 2008 +0000 +++ b/allcodecs.c Mon Sep 01 14:33:54 2008 +0000 @@ -189,6 +189,7 @@ 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);
--- a/avcodec.h Mon Sep 01 11:19:26 2008 +0000 +++ b/avcodec.h Mon Sep 01 14:33:54 2008 +0000 @@ -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 @@ CODEC_ID_WMAPRO, CODEC_ID_WMALOSSLESS, CODEC_ID_ATRAC3P, + CODEC_ID_EAC3, /* subtitle codecs */ CODEC_ID_DVD_SUBTITLE= 0x17000,