From 00496302d67141e4b4ff2349eeaf7e40b05c13a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= <Reimar.Doeffinger@gmx.de>
Date: Mon, 7 Jul 2008 16:30:39 +0000
Subject: [PATCH] 10l, fix nuv_header for the case when there is no video
 stream.

Originally committed as revision 14101 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavformat/nuv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 74393afaa70..995775dc393 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -179,7 +179,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
         ctx->a_id = -1;
 
     get_codec_data(pb, vst, ast, is_mythtv);
-    ctx->rtjpg_video = vst->codec->codec_id == CODEC_ID_NUV;
+    ctx->rtjpg_video = vst && vst->codec->codec_id == CODEC_ID_NUV;
     return 0;
 }
 
-- 
GitLab