]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avisynth.c
Merge remote-tracking branch 'shariman/wmall'
[ffmpeg] / libavformat / avisynth.c
index 32e6d1e7d2848fe6db34e8e25e823d0922df6b17..17ff5a88a3c44ae281c21392b1d32ef00a33e410 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * AVISynth support for ffmpeg system
+ * AVISynth support
  * Copyright (c) 2006 DivX, Inc.
  *
  * This file is part of FFmpeg.
@@ -20,6 +20,7 @@
  */
 
 #include "avformat.h"
+#include "internal.h"
 #include "riff.h"
 
 #include <windows.h>
@@ -84,7 +85,8 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
                   if (AVIStreamReadFormat(stream->handle, 0, &wvfmt, &struct_size) != S_OK)
                     continue;
 
-                  st = av_new_stream(s, id);
+                  st = avformat_new_stream(s, NULL);
+                  st->id = id;
                   st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
 
                   st->codec->block_align = wvfmt.nBlockAlign;
@@ -110,7 +112,8 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
                   if (AVIStreamReadFormat(stream->handle, 0, &imgfmt, &struct_size) != S_OK)
                     continue;
 
-                  st = av_new_stream(s, id);
+                  st = avformat_new_stream(s, NULL);
+                  st->id = id;
                   st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                   st->r_frame_rate.num = stream->info.dwRate;
                   st->r_frame_rate.den = stream->info.dwScale;
@@ -143,7 +146,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
               st->codec->stream_codec_tag = stream->info.fccHandler;
 
-              av_set_pts_info(st, 64, info.dwScale, info.dwRate);
+              avpriv_set_pts_info(st, 64, info.dwScale, info.dwRate);
               st->start_time = stream->info.dwStart;
             }
         }