diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-03-28 23:10:53 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-03-28 23:10:53 +0000 |
commit | 96d8b5a62c9a272ff1403bb86b5b01faec91ffec (patch) | |
tree | fe2352b30904a92fa78107e38bdef3fe498211b3 /libavcodec/mjpeg.c | |
parent | 906b578f1649257ed2b8050047b72d14d8911906 (diff) | |
download | ffmpeg-96d8b5a62c9a272ff1403bb86b5b01faec91ffec.tar.gz |
hmm av_log(..., get_bits());
Originally committed as revision 2939 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r-- | libavcodec/mjpeg.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index b14fda442c..255a82d2cb 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -1530,16 +1530,22 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) if (id == ff_get_fourcc("JFIF")) { - int t_w, t_h; + int t_w, t_h, v1, v2; skip_bits(&s->gb, 8); /* the trailing zero-byte */ - if (s->avctx->debug & FF_DEBUG_PICT_INFO) - av_log(s->avctx, AV_LOG_INFO, "mjpeg: JFIF header found (version: %x.%x)\n", - get_bits(&s->gb, 8), get_bits(&s->gb, 8)); + v1= get_bits(&s->gb, 8); + v2= get_bits(&s->gb, 8); skip_bits(&s->gb, 8); s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 16); s->avctx->sample_aspect_ratio.den= get_bits(&s->gb, 16); + if (s->avctx->debug & FF_DEBUG_PICT_INFO) + av_log(s->avctx, AV_LOG_INFO, "mjpeg: JFIF header found (version: %x.%x) SAR=%d/%d\n", + v1, v2, + s->avctx->sample_aspect_ratio.num, + s->avctx->sample_aspect_ratio.den + ); + t_w = get_bits(&s->gb, 8); t_h = get_bits(&s->gb, 8); if (t_w && t_h) @@ -1636,7 +1642,8 @@ static int mjpeg_decode_com(MJpegDecodeContext *s) else cbuf[i] = 0; - av_log(s->avctx, AV_LOG_INFO, "mjpeg comment: '%s'\n", cbuf); + if(s->avctx->debug & FF_DEBUG_PICT_INFO) + av_log(s->avctx, AV_LOG_INFO, "mjpeg comment: '%s'\n", cbuf); /* buggy avid, it puts EOI only at every 10th frame */ if (!strcmp(cbuf, "AVID")) |