Browse code

Merge commit '733f4b05f0e120ddd0393b23f2b6d9106cf922e4'

* commit '733f4b05f0e120ddd0393b23f2b6d9106cf922e4':
avplay: Check format allocation inside decode_thread()

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2015/02/18 05:16:22
Showing 1 changed files
... ...
@@ -2884,6 +2884,11 @@ static int read_thread(void *arg)
2884 2884
     is->eof = 0;
2885 2885
 
2886 2886
     ic = avformat_alloc_context();
2887
+    if (!ic) {
2888
+        av_log(NULL, AV_LOG_FATAL, "Could not allocate context.\n");
2889
+        ret = AVERROR(ENOMEM);
2890
+        goto fail;
2891
+    }
2887 2892
     ic->interrupt_callback.callback = decode_interrupt_cb;
2888 2893
     ic->interrupt_callback.opaque = is;
2889 2894
     if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {