avio: redesign ffio_rewind_with_probe_data()

This prevents a double free

Fixes CID718285
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2012-10-13 02:08:59 +02:00
parent 54b2d317ed
commit 120b38b966
3 changed files with 11 additions and 7 deletions

View File

@@ -470,8 +470,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
}
/* rewind. reuse probe buffer to avoid seeking */
if ((ret = ffio_rewind_with_probe_data(pb, buf, pd.buf_size)) < 0)
av_free(buf);
ret = ffio_rewind_with_probe_data(pb, &buf, pd.buf_size);
return ret;
}