---
 libavformat/a64.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavformat/a64.c b/libavformat/a64.c
index c8e8e64..fdd6f62 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -27,7 +27,7 @@
 
 static int a64_write_header(AVFormatContext *s)
 {
-    AVCodecContext *avctx = s->streams[0]->codec;
+    AVCodecParameters *par = s->streams[0]->codecpar;
     uint8_t header[5] = {
         0x00, //load
         0x40, //address
@@ -36,20 +36,20 @@ static int a64_write_header(AVFormatContext *s)
         0x00  //fps in 50/fps;
     };
 
-    if (avctx->extradata_size < 4) {
+    if (par->extradata_size < 4) {
         av_log(s, AV_LOG_ERROR, "Missing extradata\n");
         return AVERROR_INVALIDDATA;
     }
 
-    switch (avctx->codec->id) {
+    switch (par->codec_id) {
     case AV_CODEC_ID_A64_MULTI:
         header[2] = 0x00;
-        header[3] = AV_RB32(avctx->extradata+0);
+        header[3] = AV_RB32(par->extradata+0);
         header[4] = 2;
         break;
     case AV_CODEC_ID_A64_MULTI5:
         header[2] = 0x01;
-        header[3] = AV_RB32(avctx->extradata+0);
+        header[3] = AV_RB32(par->extradata+0);
         header[4] = 3;
         break;
     default:
-- 
2.0.0

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to