OSDN Git Service

lavf: put av_new_stream() compatibility wrapper back
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 6 Feb 2012 16:21:46 +0000 (17:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 9 Feb 2012 18:03:32 +0000 (19:03 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 7988f27..71baf58 100644 (file)
@@ -2751,6 +2751,16 @@ void avformat_close_input(AVFormatContext **ps)
         avio_close(pb);
 }
 
+#if FF_API_NEW_STREAM
+AVStream *av_new_stream(AVFormatContext *s, int id)
+{
+    AVStream *st = avformat_new_stream(s, NULL);
+    if (st)
+        st->id = id;
+    return st;
+}
+#endif
+
 AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)
 {
     AVStream *st;