diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-24 22:39:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-24 22:39:22 +0200 |
commit | 351b22caae65ad5c5d2deb3815d79d032eb04385 (patch) | |
tree | 1fe284e7f5a7b035720e5c959188cede26d2c06a /libavformat/mux.c | |
parent | 383a04a127734d25c1ef7839c489bba297855801 (diff) | |
download | ffmpeg-351b22caae65ad5c5d2deb3815d79d032eb04385.tar.gz |
avformat/mux: support re-interleaving packets in ff_write_chained()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r-- | libavformat/mux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index 3abeccfaa0..bd9f7e5dcc 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -960,7 +960,7 @@ int av_get_output_timestamp(struct AVFormatContext *s, int stream, } int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, - AVFormatContext *src) + AVFormatContext *src, int interleave) { AVPacket local_pkt; int ret; @@ -980,7 +980,8 @@ int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt, src->streams[pkt->stream_index]->time_base, dst->streams[dst_stream]->time_base); - ret = av_write_frame(dst, &local_pkt); + if (interleave) ret = av_interleaved_write_frame(dst, &local_pkt); + else ret = av_write_frame(dst, &local_pkt); pkt->buf = local_pkt.buf; pkt->destruct = local_pkt.destruct; return ret; |