From 79593096c43c13a4524822fceffca7e4647ff67d Mon Sep 17 00:00:00 2001 From: Andrey Myznikov Date: Mon, 18 Aug 2014 20:03:31 +0300 Subject: [PATCH] avformat/a64: Avoid segfault in a64_write_header() when stream codec is not open Signed-off-by: Michael Niedermayer --- libavformat/a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/a64.c b/libavformat/a64.c index 03679b2838..a7f93a27b1 100644 --- a/libavformat/a64.c +++ b/libavformat/a64.c @@ -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);