X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmux.c;h=76b0fb4dc6c02a77d82b44b728e3b27d7227d593;hb=9e6b5e61a0c91e25e298d0a21b189c4c95443795;hp=f7a7f3a2c9b4e9023836909c1b7f6a57f57127ef;hpb=d641ee94b57a581ab0e45bb21c64bb5a32b0502c;p=ffmpeg diff --git a/libavformat/mux.c b/libavformat/mux.c index f7a7f3a2c9b..76b0fb4dc6c 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -420,7 +420,10 @@ void ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt, this_pktl = av_mallocz(sizeof(AVPacketList)); this_pktl->pkt = *pkt; +#if FF_API_DESTRUCT_PACKET pkt->destruct = NULL; // do not free original but only the copy +#endif + pkt->buf = NULL; av_dup_packet(&this_pktl->pkt); // duplicate the packet if it uses non-alloced memory if (s->streams[pkt->stream_index]->last_in_packet_buffer) { @@ -492,15 +495,6 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, } } -#if FF_API_INTERLEAVE_PACKET -int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, - AVPacket *pkt, int flush) -{ - return ff_interleave_packet_per_dts(s, out, pkt, flush); -} - -#endif - /** * Interleave an AVPacket correctly so it can be muxed. * @param out the interleaved packet will be output here