Revision 046bee86 libavcodec/mjpeg.c

View differences:

libavcodec/mjpeg.c
1532 1532
    {
1533 1533
	int t_w, t_h;
1534 1534
	skip_bits(&s->gb, 8); /* the trailing zero-byte */
1535
	av_log(s->avctx, AV_LOG_INFO, "mjpeg: JFIF header found (version: %x.%x)\n",
1535
        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1536
            av_log(s->avctx, AV_LOG_INFO, "mjpeg: JFIF header found (version: %x.%x)\n",
1536 1537
	    get_bits(&s->gb, 8), get_bits(&s->gb, 8));
1537 1538
        skip_bits(&s->gb, 8);
1538 1539

  
......
1553 1554
    
1554 1555
    if (id == ff_get_fourcc("Adob") && (get_bits(&s->gb, 8) == 'e'))
1555 1556
    {
1556
	av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found\n");
1557
        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1558
            av_log(s->avctx, AV_LOG_INFO, "mjpeg: Adobe header found\n");
1557 1559
	skip_bits(&s->gb, 16); /* version */
1558 1560
	skip_bits(&s->gb, 16); /* flags0 */
1559 1561
	skip_bits(&s->gb, 16); /* flags1 */
......
1563 1565
    }
1564 1566

  
1565 1567
    if (id == ff_get_fourcc("LJIF")){
1566
        av_log(s->avctx, AV_LOG_INFO, "Pegasus lossless jpeg header found\n");
1568
        if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1569
            av_log(s->avctx, AV_LOG_INFO, "Pegasus lossless jpeg header found\n");
1567 1570
	skip_bits(&s->gb, 16); /* version ? */
1568 1571
	skip_bits(&s->gb, 16); /* unknwon always 0? */
1569 1572
	skip_bits(&s->gb, 16); /* unknwon always 0? */
......
1602 1605
	    skip_bits(&s->gb, 32); /* scan off */
1603 1606
	    skip_bits(&s->gb, 32); /* data off */
1604 1607
#endif
1605
	    if (s->first_picture)
1608
            if (s->avctx->debug & FF_DEBUG_PICT_INFO)
1606 1609
		av_log(s->avctx, AV_LOG_INFO, "mjpeg: Apple MJPEG-A header found\n");
1607 1610
	}
1608 1611
    }
......
1779 1782
		/* process markers */
1780 1783
		if (start_code >= 0xd0 && start_code <= 0xd7) {
1781 1784
		    dprintf("restart marker: %d\n", start_code&0x0f);
1782
		} else if (s->first_picture) {
1783 1785
		    /* APP fields */
1784
		    if (start_code >= 0xe0 && start_code <= 0xef)
1785
			mjpeg_decode_app(s);
1786
		} else if (start_code >= APP0 && start_code <= APP15) {
1787
		    mjpeg_decode_app(s);
1786 1788
		    /* Comment */
1787
		    else if (start_code == COM)
1788
			mjpeg_decode_com(s);
1789
		} else if (start_code == COM){
1790
		    mjpeg_decode_com(s);
1789 1791
		}
1790 1792

  
1791 1793
                switch(start_code) {

Also available in: Unified diff