]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aac_ac3_parser.c
cabac: x86 version of get_cabac_bypass
[ffmpeg] / libavcodec / aac_ac3_parser.c
index 58f30a4180ec9908e54fefac85e9c605d3ec5681..b17cd4d52f0541366fe57e0806108b93464b4efe 100644 (file)
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/common.h"
 #include "parser.h"
 #include "aac_ac3_parser.h"
 
@@ -78,7 +79,7 @@ get_next:
        and total number of samples found in an AAC ADTS header are not
        reliable. Bit rate is still accurate because the total frame duration in
        seconds is still correct (as is the number of bits in the frame). */
-    if (avctx->codec_id != CODEC_ID_AAC) {
+    if (avctx->codec_id != AV_CODEC_ID_AAC) {
         avctx->sample_rate = s->sample_rate;
 
         /* allow downmixing to stereo (or mono for AC-3) */
@@ -86,14 +87,14 @@ 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_EAC3)))) {
+                (avctx->codec_id == AV_CODEC_ID_AC3 ||
+                 avctx->codec_id == AV_CODEC_ID_EAC3)))) {
             avctx->channels = avctx->request_channels;
         } else {
             avctx->channels = s->channels;
             avctx->channel_layout = s->channel_layout;
         }
-        avctx->frame_size = s->samples;
+        s1->duration = s->samples;
         avctx->audio_service_type = s->service_type;
     }