diff options
Diffstat (limited to 'libavformat/ivfenc.c')
-rw-r--r-- | libavformat/ivfenc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c index d7eed73e79..3913988144 100644 --- a/libavformat/ivfenc.c +++ b/libavformat/ivfenc.c @@ -34,15 +34,15 @@ static int ivf_write_header(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "Currently only VP8 is supported!\n"); return AVERROR(EINVAL); } - put_buffer(pb, "DKIF", 4); - put_le16(pb, 0); // version - put_le16(pb, 32); // header length - put_le32(pb, ctx->codec_tag ? ctx->codec_tag : AV_RL32("VP80")); - put_le16(pb, ctx->width); - put_le16(pb, ctx->height); - put_le32(pb, s->streams[0]->time_base.den); - put_le32(pb, s->streams[0]->time_base.num); - put_le64(pb, s->streams[0]->duration); // TODO: duration or number of frames?!? + avio_write(pb, "DKIF", 4); + avio_wl16(pb, 0); // version + avio_wl16(pb, 32); // header length + avio_wl32(pb, ctx->codec_tag ? ctx->codec_tag : AV_RL32("VP80")); + avio_wl16(pb, ctx->width); + avio_wl16(pb, ctx->height); + avio_wl32(pb, s->streams[0]->time_base.den); + avio_wl32(pb, s->streams[0]->time_base.num); + avio_wl64(pb, s->streams[0]->duration); // TODO: duration or number of frames?!? return 0; } @@ -50,9 +50,9 @@ static int ivf_write_header(AVFormatContext *s) static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt) { AVIOContext *pb = s->pb; - put_le32(pb, pkt->size); - put_le64(pb, pkt->pts); - put_buffer(pb, pkt->data, pkt->size); + avio_wl32(pb, pkt->size); + avio_wl64(pb, pkt->pts); + avio_write(pb, pkt->data, pkt->size); put_flush_packet(pb); return 0; |