mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-26 08:23:10 +00:00
10l fix
Originally committed as revision 1300 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
843342efb7
commit
1730832639
@ -877,8 +877,12 @@ static int mjpeg_decode_sof0(MJpegDecodeContext *s)
|
|||||||
if (s->interlaced)
|
if (s->interlaced)
|
||||||
w *= 2;
|
w *= 2;
|
||||||
s->linesize[i] = w;
|
s->linesize[i] = w;
|
||||||
/* memory test is done in mjpeg_decode_sos() */
|
|
||||||
s->current_picture[i] = av_mallocz(w * h);
|
s->current_picture[i] = av_mallocz(w * h);
|
||||||
|
if (!s->current_picture[i])
|
||||||
|
{
|
||||||
|
dprintf("error: no picture buffers allocated\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
s->first_picture = 0;
|
s->first_picture = 0;
|
||||||
}
|
}
|
||||||
@ -1419,7 +1423,8 @@ static int mjpeg_decode_frame(AVCodecContext *avctx,
|
|||||||
mjpeg_decode_dht(s);
|
mjpeg_decode_dht(s);
|
||||||
break;
|
break;
|
||||||
case SOF0:
|
case SOF0:
|
||||||
mjpeg_decode_sof0(s);
|
if (mjpeg_decode_sof0(s) < 0)
|
||||||
|
return -1;
|
||||||
break;
|
break;
|
||||||
case EOI:
|
case EOI:
|
||||||
eoi_parser:
|
eoi_parser:
|
||||||
@ -1578,7 +1583,8 @@ read_header:
|
|||||||
{
|
{
|
||||||
init_get_bits(&s->gb, buf+sof_offs, buf_end - (buf+sof_offs));
|
init_get_bits(&s->gb, buf+sof_offs, buf_end - (buf+sof_offs));
|
||||||
s->start_code = SOF0;
|
s->start_code = SOF0;
|
||||||
mjpeg_decode_sof0(s);
|
if (mjpeg_decode_sof0(s) < 0)
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sos_offs = get_bits(&hgb, 32);
|
sos_offs = get_bits(&hgb, 32);
|
||||||
|
Loading…
Reference in New Issue
Block a user