[FFmpeg-cvslog] smjpegenc: use bits_per_coded_sample instead of calling function

Paul B Mahol git at videolan.org
Wed Nov 7 02:33:17 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Nov  7 01:29:07 2012 +0000| [7c2cfaac6a24d5767c0b2f3a21190e1777b8ff7d] | committer: Paul B Mahol

smjpegenc: use bits_per_coded_sample instead of calling function

Final result is same and this allows support of multiple values per codec.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c2cfaac6a24d5767c0b2f3a21190e1777b8ff7d
---

 libavformat/smjpegenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/smjpegenc.c b/libavformat/smjpegenc.c
index 6dbc286..13095bc 100644
--- a/libavformat/smjpegenc.c
+++ b/libavformat/smjpegenc.c
@@ -67,7 +67,7 @@ static int smjpeg_write_header(AVFormatContext *s)
             avio_wl32(pb, SMJPEG_SND);
             avio_wb32(pb, 8);
             avio_wb16(pb, codec->sample_rate);
-            avio_w8(pb, av_get_bits_per_sample(codec->codec_id));
+            avio_w8(pb, codec->bits_per_coded_sample);
             avio_w8(pb, codec->channels);
             avio_wl32(pb, tag);
             avpriv_set_pts_info(st, 32, 1, 1000);



More information about the ffmpeg-cvslog mailing list