]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/vc1testenc.c
movenc: Write the moof atom in two passes
[ffmpeg] / libavformat / vc1testenc.c
index 9c4eea2701d6d996e6a05609b0a31834f844c361..9d55fee46df7f4ad347c7405939ae657bc57a93d 100644 (file)
@@ -30,7 +30,7 @@ static int vc1test_write_header(AVFormatContext *s)
     AVCodecContext *avc = s->streams[0]->codec;
     AVIOContext *pb = s->pb;
 
-    if (avc->codec_id != CODEC_ID_WMV3) {
+    if (avc->codec_id != AV_CODEC_ID_WMV3) {
         av_log(s, AV_LOG_ERROR, "Only WMV3 is accepted!\n");
         return -1;
     }
@@ -63,7 +63,6 @@ static int vc1test_write_packet(AVFormatContext *s, AVPacket *pkt)
     avio_wl32(pb, pkt->size | ((pkt->flags & AV_PKT_FLAG_KEY) ? 0x80000000 : 0));
     avio_wl32(pb, pkt->pts);
     avio_write(pb, pkt->data, pkt->size);
-    avio_flush(pb);
     ctx->frames++;
 
     return 0;
@@ -88,8 +87,8 @@ AVOutputFormat ff_vc1t_muxer = {
     .mime_type         = "",
     .extensions        = "rcv",
     .priv_data_size    = sizeof(RCVContext),
-    .audio_codec       = CODEC_ID_NONE,
-    .video_codec       = CODEC_ID_WMV3,
+    .audio_codec       = AV_CODEC_ID_NONE,
+    .video_codec       = AV_CODEC_ID_WMV3,
     .write_header      = vc1test_write_header,
     .write_packet      = vc1test_write_packet,
     .write_trailer     = vc1test_write_trailer,