Revision 4eecd5bc libavcodec/mjpeg.c

View differences:

libavcodec/mjpeg.c
882 882
{
883 883
    MJpegDecodeContext *s = avctx->priv_data;
884 884
    MpegEncContext s2;
885
    memset(s, 0, sizeof(MJpegDecodeContext));
885 886

  
886 887
    s->avctx = avctx;
887 888

  
......
1573 1574
    if (get_bits(&s->gb, 16) != 4)
1574 1575
	return -1;
1575 1576
    s->restart_interval = get_bits(&s->gb, 16);
1577
    s->restart_count = 0;
1576 1578
    dprintf("restart interval: %d\n", s->restart_interval);
1577 1579

  
1578 1580
    return 0;
......
1892 1894
                switch(start_code) {
1893 1895
                case SOI:
1894 1896
		    s->restart_interval = 0;
1897
		    s->restart_count = 0;
1895 1898
                    /* nothing to do on SOI */
1896 1899
                    break;
1897 1900
                case DQT:
......
2000 2003
read_header:
2001 2004
    /* reset on every SOI */
2002 2005
    s->restart_interval = 0;
2006
    s->restart_count = 0;
2003 2007
    s->mjpb_skiptosod = 0;
2004 2008

  
2005 2009
    init_get_bits(&hgb, buf_ptr, /*buf_size*/(buf_end - buf_ptr)*8);

Also available in: Unified diff