Browse Source

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

Originally committed as revision 19436 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Art Clarke Benoit Fouet 16 years ago
parent
commit
ebb82604b0
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/utils.c

+ 3
- 1
libavformat/utils.c View File

@@ -499,7 +499,9 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
av_freep(&pd->buf);
if (pb)
url_fclose(pb);
av_freep(ic_ptr);
if (ap && ap->prealloced_context)
av_free(*ic_ptr);
*ic_ptr = NULL;
return err;

}


Loading…
Cancel
Save