diff utils.c @ 5770:20ed96c29062 libavformat

av_find_stream_info(): Add a workaround for backwards compatible HE-AAC signaling. The sample rate, frame size, and channel count from the container are not reliable when backwards compatible signaling is used.
author alexc
date Mon, 08 Mar 2010 00:00:50 +0000
parents faa085c983d5
children 66e85b4ca68a
line wrap: on
line diff
--- a/utils.c	Sun Mar 07 23:10:18 2010 +0000
+++ b/utils.c	Mon Mar 08 00:00:50 2010 +0000
@@ -2116,6 +2116,11 @@
 
     for(i=0;i<ic->nb_streams;i++) {
         st = ic->streams[i];
+        if (st->codec->codec_id == CODEC_ID_AAC) {
+            st->codec->sample_rate = 0;
+            st->codec->frame_size = 0;
+            st->codec->channels = 0;
+        }
         if(st->codec->codec_type == CODEC_TYPE_VIDEO){
 /*            if(!st->time_base.num)
                 st->time_base= */