]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tty.c
apedec: av_fast_malloc() instead of av_realloc()
[ffmpeg] / libavformat / tty.c
index 50514e8b08bbca30f998fd1f4ceadea319c774bf..84f99377da478ebdb3d225dbc53722b98b6be7e2 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 {
@@ -71,12 +72,11 @@ static int efi_read(AVFormatContext *avctx, uint64_t start_pos)
     return 0;
 }
 
-static int read_header(AVFormatContext *avctx,
-                       AVFormatParameters *ap)
+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 +97,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);