]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/r3d.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / r3d.c
index d84fd2cc1dab643c004bfb71bc8456a5f0d2357c..874c3614068106b6fa48cdebf4e2091ea616d8d1 100644 (file)
@@ -25,6 +25,7 @@
 #include "libavutil/dict.h"
 #include "libavutil/mathematics.h"
 #include "avformat.h"
+#include "internal.h"
 
 typedef struct {
     unsigned video_offsets_count;
@@ -52,7 +53,7 @@ static int read_atom(AVFormatContext *s, Atom *atom)
 
 static int r3d_read_red1(AVFormatContext *s)
 {
-    AVStream *st = av_new_stream(s, 0);
+    AVStream *st = avformat_new_stream(s, NULL);
     char filename[258];
     int tmp;
     int av_unused tmp2;
@@ -70,7 +71,7 @@ static int r3d_read_red1(AVFormatContext *s)
     av_dlog(s, "unknown1 %d\n", tmp);
 
     tmp = avio_rb32(s->pb);
-    av_set_pts_info(st, 32, 1, tmp);
+    avpriv_set_pts_info(st, 32, 1, tmp);
 
     tmp = avio_rb32(s->pb); // filenum
     av_dlog(s, "filenum %d\n", tmp);
@@ -89,13 +90,13 @@ static int r3d_read_red1(AVFormatContext *s)
     tmp = avio_r8(s->pb); // audio channels
     av_dlog(s, "audio channels %d\n", tmp);
     if (tmp > 0) {
-        AVStream *ast = av_new_stream(s, 1);
+        AVStream *ast = avformat_new_stream(s, NULL);
         if (!ast)
             return AVERROR(ENOMEM);
         ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         ast->codec->codec_id = CODEC_ID_PCM_S32BE;
         ast->codec->channels = tmp;
-        av_set_pts_info(ast, 32, 1, st->time_base.den);
+        avpriv_set_pts_info(ast, 32, 1, st->time_base.den);
     }
 
     avio_read(s->pb, filename, 257);