avformat/mux: support re-interleaving packets in ff_write_chained()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
383a04a127
commit
351b22caae
9 changed files with 12 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue