try to fill in missing bits_per_sample
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 20 Feb 2007 16:18:59 +0000 (16:18 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 20 Feb 2007 16:18:59 +0000 (16:18 +0000)
Originally committed as revision 8043 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index cabe3a7..04ee6f2 100644 (file)
@@ -2018,6 +2018,9 @@ int av_find_stream_info(AVFormatContext *ic)
                     st->r_frame_rate.den = st->time_base.num;
                 }
             }
+        }else if(st->codec->codec_type == CODEC_TYPE_AUDIO) {
+            if(!st->codec->bits_per_sample)
+                st->codec->bits_per_sample= av_get_bits_per_sample(st->codec->codec_id);
         }
     }