diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-03-08 22:14:26 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-03-08 22:14:26 +0000 |
commit | cd34fd9c8cf6a7e9729c18997cb13a26a5a218a2 (patch) | |
tree | e5cbfa39073326566b1fbdf990fe1061623f7a25 | |
parent | 990287c4689d6804ea0b763c6ef482640d7f325b (diff) | |
download | ffmpeg-cd34fd9c8cf6a7e9729c18997cb13a26a5a218a2.tar.gz |
factorize write packet
Originally committed as revision 17888 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/gxfenc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c index f72e901ff7..9dcbaf2643 100644 --- a/libavformat/gxfenc.c +++ b/libavformat/gxfenc.c @@ -762,7 +762,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size) return 16; } -static int gxf_write_media_packet(AVFormatContext *s, AVPacket *pkt) +static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt) { GXFContext *gxf = s->priv_data; ByteIOContext *pb = s->pb; @@ -782,14 +782,9 @@ static int gxf_write_media_packet(AVFormatContext *s, AVPacket *pkt) if (st->codec->codec_type == CODEC_TYPE_VIDEO) gxf->nb_fields += 2; // count fields - return updatePacketSize(pb, pos); -} + put_flush_packet(pb); -static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt) -{ - gxf_write_media_packet(s, pkt); - put_flush_packet(s->pb); - return 0; + return updatePacketSize(pb, pos); } static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush) |