Commit 710cd0fd authored by Michael Niedermayer's avatar Michael Niedermayer

avformat: Fix infinite probing that reads the whole file

Fixes: otonajoshi_avformat_tries_to_load_whole.ts
Reported-by: JEEB (on IRC)
Thanks-to: nevcairiel
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 06a43bae
......@@ -771,6 +771,8 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
if (pktl) {
*pkt = pktl->pkt;
st = s->streams[pkt->stream_index];
if (s->raw_packet_buffer_remaining_size <= 0)
probe_codec(s, st, NULL);
if(st->request_probe <= 0){
s->raw_packet_buffer = pktl->next;
s->raw_packet_buffer_remaining_size += pkt->size;
......
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