projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abe6330
)
lavf: check that the context to avformat_open_input() is valid.
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 18 Apr 2012 11:49:07 +0000
(13:49 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 18 Apr 2012 13:30:34 +0000
(15:30 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c
patch
|
blob
|
history
diff --git
a/libavformat/utils.c
b/libavformat/utils.c
index
0636742
..
1bf5ac5
100644
(file)
--- a/
libavformat/utils.c
+++ b/
libavformat/utils.c
@@
-589,6
+589,10
@@
int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
if (!s && !(s = avformat_alloc_context()))
return AVERROR(ENOMEM);
+ if (!s->av_class){
+ av_log(0, AV_LOG_ERROR, "Input context has not been properly allocated by avformat_alloc_context() and is not NULL either\n");
+ return AVERROR(EINVAL);
+ }
if (fmt)
s->iformat = fmt;