OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65b875d
)
Only free '*ic_ptr' when a caller has pre-allocated a context and passed it in
author
Art Clarke
<aclarke@vlideshow.com>
Wed, 15 Jul 2009 10:00:16 +0000
(10:00 +0000)
committer
Benoit Fouet
<benoit.fouet@free.fr>
Wed, 15 Jul 2009 10:00:16 +0000
(10:00 +0000)
(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
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
3fce3fa
..
0c1a50d
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-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;
}