]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tty.c
ffplay: remove global video state
[ffmpeg] / libavformat / tty.c
index 913ec457da09582decb248b45bb37a943eda9883..6780c502168eead38dc19a2f636253ab0b31ea5a 100644 (file)
@@ -31,6 +31,7 @@
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
 #include "avformat.h"
+#include "internal.h"
 #include "sauce.h"
 
 typedef struct {
@@ -76,7 +77,7 @@ static int read_header(AVFormatContext *avctx,
 {
     TtyDemuxContext *s = avctx->priv_data;
     int width = 0, height = 0, ret = 0;
-    AVStream *st = av_new_stream(avctx, 0);
+    AVStream *st = avformat_new_stream(avctx, NULL);
     AVRational framerate;
 
     if (!st) {
@@ -97,7 +98,7 @@ static int read_header(AVFormatContext *avctx,
     }
     st->codec->width  = width;
     st->codec->height = height;
-    av_set_pts_info(st, 60, framerate.den, framerate.num);
+    avpriv_set_pts_info(st, 60, framerate.den, framerate.num);
 
     /* simulate tty display speed */
     s->chars_per_frame = FFMAX(av_q2d(st->time_base)*s->chars_per_frame, 1);