You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/img2dec: do not rewind custom io buffers
Fixes double free with some applications Fixes vlc ticket14121 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -341,7 +341,10 @@ int ff_img_read_header(AVFormatContext *s1)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ffio_rewind_with_probe_data(s1->pb, &probe_buffer, probe_buffer_size);
|
if (s1->flags & AVFMT_FLAG_CUSTOM_IO) {
|
||||||
|
avio_seek(s1->pb, 0, SEEK_SET);
|
||||||
|
} else
|
||||||
|
ffio_rewind_with_probe_data(s1->pb, &probe_buffer, probe_buffer_size);
|
||||||
}
|
}
|
||||||
if (st->codec->codec_id == AV_CODEC_ID_NONE)
|
if (st->codec->codec_id == AV_CODEC_ID_NONE)
|
||||||
st->codec->codec_id = ff_guess_image2_codec(s->path);
|
st->codec->codec_id = ff_guess_image2_codec(s->path);
|
||||||
|
Reference in New Issue
Block a user