]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/wtvdec.c
ffmpeg: preserve avg_frame_rate on stream copy.
[ffmpeg] / libavformat / wtvdec.c
index af0b711a0a6255930c725817210d6f80b30e0aee..543fcb68d27e7b46b8854b2d7f11253ef1d84379 100644 (file)
@@ -414,7 +414,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
     if (!filesize)
         goto done;
 
-    st = av_new_stream(s, 0);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         goto done;
     av_dict_set(&st->metadata, "title", description, 0);
@@ -562,9 +562,10 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code
         WtvStream *wst = av_mallocz(sizeof(WtvStream));
         if (!wst)
             return NULL;
-        st = av_new_stream(s, sid);
+        st = avformat_new_stream(s, NULL);
         if (!st)
             return NULL;
+        st->id = sid;
         st->priv_data = wst;
     }
     st->codec->codec_type = codec_type;
@@ -772,7 +773,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
                 buf_size = FFMIN(len - consumed, sizeof(buf));
                 avio_read(pb, buf, buf_size);
                 consumed += buf_size;
-                ff_parse_mpeg2_descriptor(s, st, 0, &pbuf, buf + buf_size, 0, 0, 0, 0);
+                ff_parse_mpeg2_descriptor(s, st, 0, &pbuf, buf + buf_size, NULL, 0, 0, NULL);
             }
         } else if (!ff_guidcmp(g, EVENTID_AudioTypeSpanningEvent)) {
             int stream_index = ff_find_stream_index(s, sid);