AVFormatInternal.parse_pkt is always blank after having been used. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavformat/mux.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/libavformat/mux.c b/libavformat/mux.c index c5e07aaf1c..47883ece37 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -1196,8 +1196,6 @@ int av_write_frame(AVFormatContext *s, AVPacket *in) * The following avoids copying in's data unnecessarily. * Copying side data is unavoidable as a bitstream filter * may change it, e.g. free it on errors. */ - av_packet_unref(pkt); - pkt->buf = NULL; pkt->data = in->data; pkt->size = in->size; ret = av_packet_copy_props(pkt, in); @@ -1240,7 +1238,6 @@ int av_write_trailer(AVFormatContext *s) AVPacket *const pkt = s->internal->parse_pkt; int i, ret1, ret = 0; - av_packet_unref(pkt); for (i = 0; i < s->nb_streams; i++) { if (s->streams[i]->internal->bsfc) { ret1 = write_packets_from_bsfs(s, s->streams[i], pkt, 1/*interleaved*/); @@ -1345,7 +1342,6 @@ static int write_uncoded_frame_internal(AVFormatContext *s, int stream_index, if (!framep) goto fail; - av_packet_unref(pkt); pkt->buf = av_buffer_create((void *)framep, bufsize, uncoded_frame_free, NULL, 0); if (!pkt->buf) { -- 2.30.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".