changeset 2912:d309f070a747 libavformat

check av_new_stream return value
author bcoudurier
date Tue, 08 Jan 2008 13:48:52 +0000
parents ae79fd89ca8b
children f05588003063
files mxf.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mxf.c	Mon Jan 07 23:52:51 2008 +0000
+++ b/mxf.c	Tue Jan 08 13:48:52 2008 +0000
@@ -775,6 +775,10 @@
             continue;
 
         st = av_new_stream(mxf->fc, source_track->track_id);
+        if (!st) {
+            av_log(mxf->fc, AV_LOG_ERROR, "could not allocate stream\n");
+            return -1;
+        }
         st->priv_data = source_track;
         st->duration = component->duration;
         if (st->duration == -1)