[FFmpeg-cvslog] avformat/mxfenc: fix muxing when audio tracks are longer than video track
Baptiste Coudurier
git at videolan.org
Tue Aug 21 22:15:37 EEST 2018
ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Sun Apr 29 18:44:59 2018 -0700| [955a989341a5d43ba88f746b6325f5be35b48146] | committer: Baptiste Coudurier
avformat/mxfenc: fix muxing when audio tracks are longer than video track
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=955a989341a5d43ba88f746b6325f5be35b48146
---
libavformat/mxfenc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 77f60f5874..66fd0963a2 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2914,6 +2914,9 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket
while (pktl) {
if (!stream_count || pktl->pkt.stream_index == 0)
break;
+ // update last packet in packet buffer
+ if (s->streams[pktl->pkt.stream_index]->last_in_packet_buffer != pktl)
+ s->streams[pktl->pkt.stream_index]->last_in_packet_buffer = pktl;
last = pktl;
pktl = pktl->next;
stream_count--;
@@ -2921,9 +2924,6 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket
// purge packet queue
while (pktl) {
AVPacketList *next = pktl->next;
-
- if(s->streams[pktl->pkt.stream_index]->last_in_packet_buffer == pktl)
- s->streams[pktl->pkt.stream_index]->last_in_packet_buffer= NULL;
av_packet_unref(&pktl->pkt);
av_freep(&pktl);
pktl = next;
More information about the ffmpeg-cvslog
mailing list