/* 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);
}
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;
}
gxf->packet_count = 3;
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}
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);
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 {
gxf->packet_count = 0;
}
- put_flush_packet(pb);
+ avio_flush(pb);
return 0;
}