]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3_parser.c
mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext
[ffmpeg] / libavcodec / ac3_parser.c
index 067b4f98792750c6e2fbe62b86d4dfea0b8b3c39..4abcf168a20347490db060df7494405c847097b5 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/channel_layout.h"
 #include "parser.h"
 #include "ac3_parser.h"
 #include "aac_ac3_parser.h"
 #include "get_bits.h"
-#include "libavutil/audioconvert.h"
 
 
 #define AC3_HEADER_SIZE 7
@@ -134,7 +134,7 @@ int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
                         (hdr->num_blocks * 256.0));
         hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
     }
-    hdr->channel_layout = ff_ac3_channel_layout_tab[hdr->channel_mode];
+    hdr->channel_layout = avpriv_ac3_channel_layout_tab[hdr->channel_mode];
     if (hdr->lfe_on)
         hdr->channel_layout |= AV_CH_LOW_FREQUENCY;
 
@@ -167,9 +167,9 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
     if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
         hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
     if(hdr.bitstream_id>10)
-        hdr_info->codec_id = CODEC_ID_EAC3;
-    else if (hdr_info->codec_id == CODEC_ID_NONE)
-        hdr_info->codec_id = CODEC_ID_AC3;
+        hdr_info->codec_id = AV_CODEC_ID_EAC3;
+    else if (hdr_info->codec_id == AV_CODEC_ID_NONE)
+        hdr_info->codec_id = AV_CODEC_ID_AC3;
 
     *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
     *new_frame_start  = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);
@@ -186,7 +186,7 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1)
 
 
 AVCodecParser ff_ac3_parser = {
-    .codec_ids      = { CODEC_ID_AC3, CODEC_ID_EAC3 },
+    .codec_ids      = { AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 },
     .priv_data_size = sizeof(AACAC3ParseContext),
     .parser_init    = ac3_parse_init,
     .parser_parse   = ff_aac_ac3_parse,