]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tty.c
rtpdec_vp9: Update header parsing to spec draft 02
[ffmpeg] / libavformat / tty.c
index 0ae1510491774577587b43c91607320a2bf80cbe..d4c4873b81dad941013dcf4fd9333b2d8e8b1e78 100644 (file)
@@ -34,7 +34,7 @@
 #include "internal.h"
 #include "sauce.h"
 
-typedef struct {
+typedef struct TtyDemuxContext {
     AVClass *class;
     int chars_per_frame;
     uint64_t fsize;  /**< file size less metadata buffer */
@@ -83,9 +83,9 @@ static int read_header(AVFormatContext *avctx)
         ret = AVERROR(ENOMEM);
         goto fail;
     }
-    st->codec->codec_tag   = 0;
-    st->codec->codec_type  = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_id    = AV_CODEC_ID_ANSI;
+    st->codecpar->codec_tag   = 0;
+    st->codecpar->codec_type  = AVMEDIA_TYPE_VIDEO;
+    st->codecpar->codec_id    = AV_CODEC_ID_ANSI;
 
     if (s->video_size && (ret = av_parse_video_size(&width, &height, s->video_size)) < 0) {
         av_log (avctx, AV_LOG_ERROR, "Couldn't parse video size.\n");
@@ -95,8 +95,8 @@ static int read_header(AVFormatContext *avctx)
         av_log(avctx, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s->framerate);
         goto fail;
     }
-    st->codec->width  = width;
-    st->codec->height = height;
+    st->codecpar->width  = width;
+    st->codecpar->height = height;
     avpriv_set_pts_info(st, 60, framerate.den, framerate.num);
     st->avg_frame_rate = framerate;