]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mpeg.c
avc: Add a function for converting mp4 style extradata to annex b
[ffmpeg] / libavformat / mpeg.c
index 52bf40faa59667a3ddf7fd4c743fd17ff1484321..6a26d6d292a267016e82f04b8dda73d602c07b24 100644 (file)
@@ -104,8 +104,7 @@ typedef struct MpegDemuxContext {
     int sofdec;
 } MpegDemuxContext;
 
-static int mpegps_read_header(AVFormatContext *s,
-                              AVFormatParameters *ap)
+static int mpegps_read_header(AVFormatContext *s)
 {
     MpegDemuxContext *m = s->priv_data;
     const char *sofdec = "Sofdec";
@@ -532,9 +531,10 @@ static int mpegps_read_packet(AVFormatContext *s,
         goto redo;
     }
     /* no stream found: add a new stream */
-    st = av_new_stream(s, startcode);
+    st = avformat_new_stream(s, NULL);
     if (!st)
         goto skip;
+    st->id = startcode;
     st->codec->codec_type = type;
     st->codec->codec_id = codec_id;
     if (codec_id != CODEC_ID_PCM_S16BE)
@@ -613,7 +613,6 @@ AVInputFormat ff_mpegps_demuxer = {
     .read_probe     = mpegps_probe,
     .read_header    = mpegps_read_header,
     .read_packet    = mpegps_read_packet,
-    .read_seek      = NULL, //mpegps_read_seek,
     .read_timestamp = mpegps_read_dts,
     .flags = AVFMT_SHOW_IDS|AVFMT_TS_DISCONT,
 };