diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-12-08 14:10:49 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-12-08 14:10:49 +0000 |
commit | 060b8592d2ddb92285406617cc689b08793d9c33 (patch) | |
tree | 5b613ee95da7d3a6e6ae9224f7b55d9219807e40 /ffmpeg.c | |
parent | b68a7679f92aa175889c092053972cca88289934 (diff) | |
download | ffmpeg-060b8592d2ddb92285406617cc689b08793d9c33.tar.gz |
Do not assume that av_get_bits_per_sample() is a multiple of 8.
Originally committed as revision 20766 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -717,7 +717,7 @@ static void do_audio_out(AVFormatContext *s, } } else { AVPacket pkt; - int coded_bps = av_get_bits_per_sample(enc->codec->id)/8; + int coded_bps = av_get_bits_per_sample(enc->codec->id); av_init_packet(&pkt); ost->sync_opts += size_out / (osize * enc->channels); @@ -726,7 +726,7 @@ static void do_audio_out(AVFormatContext *s, /* determine the size of the coded buffer */ size_out /= osize; if (coded_bps) - size_out *= coded_bps; + size_out = size_out*coded_bps/8; //FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio() ret = avcodec_encode_audio(enc, audio_out, size_out, |