summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-17 21:16:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-17 21:16:34 +0100
commit79216a189b4e55dd3dbeb49612111061f2c2b717 (patch)
tree1c141f45a4e35bb2ff40603ce9e25fcbbd8cb547 /ffplay.c
parent32b2b7bd8c5aed23e03c2bc75ccb1d46753f8798 (diff)
parent733f4b05f0e120ddd0393b23f2b6d9106cf922e4 (diff)
Merge commit '733f4b05f0e120ddd0393b23f2b6d9106cf922e4'
* commit '733f4b05f0e120ddd0393b23f2b6d9106cf922e4': avplay: Check format allocation inside decode_thread() Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 8a9f2ad5b1..8140dd9645 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2884,6 +2884,11 @@ static int read_thread(void *arg)
is->eof = 0;
ic = avformat_alloc_context();
+ if (!ic) {
+ av_log(NULL, AV_LOG_FATAL, "Could not allocate context.\n");
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
ic->interrupt_callback.callback = decode_interrupt_cb;
ic->interrupt_callback.opaque = is;
if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {