libnut: Check nut_demuxer_init() return value.
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Dec 2011 22:35:21 +0000 (23:35 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 8 Dec 2011 20:21:33 +0000 (21:21 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/libnut.c

index 9f64544..be0328a 100644 (file)
@@ -207,6 +207,9 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
     nut_stream_header_tt * s;
     int ret, i;
 
+    if(!nut)
+        return -1;
+
     if ((ret = nut_read_headers(nut, &s, NULL))) {
         av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(ret));
         nut_demuxer_uninit(nut);