avformat/a64: Avoid segfault in a64_write_header() when stream codec is not open
authorAndrey Myznikov <andrey.myznikov@gmail.com>
Mon, 18 Aug 2014 17:03:31 +0000 (20:03 +0300)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Aug 2014 17:48:18 +0000 (19:48 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/a64.c

index 03679b2..a7f93a2 100644 (file)
@@ -40,7 +40,7 @@ static int a64_write_header(AVFormatContext *s)
         return AVERROR_INVALIDDATA;
     }
 
-    switch (avctx->codec->id) {
+    switch (avctx->codec_id) {
     case AV_CODEC_ID_A64_MULTI:
         header[2] = 0x00;
         header[3] = AV_RB32(avctx->extradata+0);