Commit ffdf38a4 authored by benoit's avatar benoit

Only free '*ic_ptr' when a caller has pre-allocated a context and passed it in

(wherein av_open_input_file assumes memory ownership).
Patch by Art Clarke a<surname> xuggle com


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19436 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d3c4a783
...@@ -499,7 +499,9 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, ...@@ -499,7 +499,9 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
av_freep(&pd->buf); av_freep(&pd->buf);
if (pb) if (pb)
url_fclose(pb); url_fclose(pb);
av_freep(ic_ptr); if (ap && ap->prealloced_context)
av_free(*ic_ptr);
*ic_ptr = NULL;
return err; return err;
} }
......
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