]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/gxfenc.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavformat / gxfenc.c
index ea9755fcd21e842d208321972a326ea829ec1f23..3f7d7851f7753efa9f907489d890159d48acbbb2 100644 (file)
@@ -310,7 +310,7 @@ static int gxf_write_material_data_section(AVFormatContext *s)
     /* estimated size */
     avio_w8(pb, MAT_SIZE);
     avio_w8(pb, 4);
-    avio_wb32(pb, url_fsize(pb) / 1024);
+    avio_wb32(pb, avio_size(pb) / 1024);
 
     return updateSize(pb, pos);
 }
@@ -634,7 +634,7 @@ static int gxf_write_header(AVFormatContext *s)
     uint8_t tracks[255] = {0};
     int i, media_info = 0;
 
-    if (url_is_streamed(pb)) {
+    if (!pb->seekable) {
         av_log(s, AV_LOG_ERROR, "gxf muxer does not support streamed output, patch welcome");
         return -1;
     }
@@ -753,7 +753,7 @@ static int gxf_write_header(AVFormatContext *s)
 
     gxf->packet_count = 3;
 
-    put_flush_packet(pb);
+    avio_flush(pb);
     return 0;
 }
 
@@ -781,12 +781,12 @@ static int gxf_write_trailer(AVFormatContext *s)
     gxf_write_map_packet(s, 1);
     gxf_write_flt_packet(s);
     gxf_write_umf_packet(s);
-    put_flush_packet(pb);
+    avio_flush(pb);
     /* update duration in all map packets */
     for (i = 1; i < gxf->map_offsets_nb; i++) {
         avio_seek(pb, gxf->map_offsets[i], SEEK_SET);
         gxf_write_map_packet(s, 1);
-        put_flush_packet(pb);
+        avio_flush(pb);
     }
 
     avio_seek(pb, end, SEEK_SET);
@@ -834,10 +834,10 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size)
         avio_wb16(pb, size / 2);
     } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {
         int frame_type = gxf_parse_mpeg_frame(sc, pkt->data, pkt->size);
-        if (frame_type == FF_I_TYPE) {
+        if (frame_type == AV_PICTURE_TYPE_I) {
             avio_w8(pb, 0x0d);
             sc->iframes++;
-        } else if (frame_type == FF_B_TYPE) {
+        } else if (frame_type == AV_PICTURE_TYPE_B) {
             avio_w8(pb, 0x0f);
             sc->bframes++;
         } else {
@@ -895,7 +895,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
         gxf->packet_count = 0;
     }
 
-    put_flush_packet(pb);
+    avio_flush(pb);
 
     return 0;
 }