mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-02 17:12:49 +02:00
Avoid crash if there is a rtjpeg quant header but no video stream in file
Originally committed as revision 5305 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2d5545c302
commit
50a6c318b2
@ -65,7 +65,7 @@ static int get_codec_data(ByteIOContext *pb, AVStream *vst,
|
|||||||
subtype = get_byte(pb);
|
subtype = get_byte(pb);
|
||||||
url_fskip(pb, 6);
|
url_fskip(pb, 6);
|
||||||
size = PKTSIZE(get_le32(pb));
|
size = PKTSIZE(get_le32(pb));
|
||||||
if (subtype == 'R') {
|
if (vst && subtype == 'R') {
|
||||||
vst->codec->extradata_size = size;
|
vst->codec->extradata_size = size;
|
||||||
vst->codec->extradata = av_malloc(size);
|
vst->codec->extradata = av_malloc(size);
|
||||||
get_buffer(pb, vst->codec->extradata, size);
|
get_buffer(pb, vst->codec->extradata, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user