]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/vc1testenc.c
avconv: rename InputStream.pts to last_dts.
[ffmpeg] / libavformat / vc1testenc.c
index 89ee9ef78c7ae64fd0fc2a2a481dbac5a6e079e6..a1228d8d7052c26518c6c584e6ceec32f499fdc6 100644 (file)
@@ -2,23 +2,24 @@
  * VC-1 test bitstreams format muxer.
  * Copyright (c) 2008 Konstantin Shishkov
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include "avformat.h"
+#include "internal.h"
 
 typedef struct RCVContext {
     int frames;
@@ -47,7 +48,7 @@ static int vc1test_write_header(AVFormatContext *s)
         avio_wl32(pb, s->streams[0]->r_frame_rate.den);
     else
         avio_wl32(pb, 0xFFFFFFFF); //variable framerate
-    av_set_pts_info(s->streams[0], 32, 1, 1000);
+    avpriv_set_pts_info(s->streams[0], 32, 1, 1000);
 
     return 0;
 }
@@ -73,7 +74,7 @@ static int vc1test_write_trailer(AVFormatContext *s)
     RCVContext *ctx = s->priv_data;
     AVIOContext *pb = s->pb;
 
-    if (!url_is_streamed(s->pb)) {
+    if (s->pb->seekable) {
         avio_seek(pb, 0, SEEK_SET);
         avio_wl24(pb, ctx->frames);
         avio_flush(pb);
@@ -82,14 +83,14 @@ static int vc1test_write_trailer(AVFormatContext *s)
 }
 
 AVOutputFormat ff_vc1t_muxer = {
-    "rcv",
-    NULL_IF_CONFIG_SMALL("VC-1 test bitstream"),
-    "",
-    "rcv",
-    sizeof(RCVContext),
-    CODEC_ID_NONE,
-    CODEC_ID_WMV3,
-    vc1test_write_header,
-    vc1test_write_packet,
-    vc1test_write_trailer,
+    .name              = "rcv",
+    .long_name         = NULL_IF_CONFIG_SMALL("VC-1 test bitstream"),
+    .mime_type         = "",
+    .extensions        = "rcv",
+    .priv_data_size    = sizeof(RCVContext),
+    .audio_codec       = CODEC_ID_NONE,
+    .video_codec       = CODEC_ID_WMV3,
+    .write_header      = vc1test_write_header,
+    .write_packet      = vc1test_write_packet,
+    .write_trailer     = vc1test_write_trailer,
 };