Commit e6e8cc8c authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/img2dec: do not rewind custom io buffers

Fixes double free with some applications

Fixes vlc ticket14121
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 954b5e34
......@@ -341,6 +341,9 @@ int ff_img_read_header(AVFormatContext *s1)
break;
}
}
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment