]> git.sesse.net Git - ffmpeg/commitdiff
avformat/hls: Use av_packet_move_ref() for packet ownership transfer
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 3 Dec 2019 10:27:38 +0000 (11:27 +0100)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 23 Dec 2019 07:39:49 +0000 (15:39 +0800)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/hls.c

index 21353bbad7524cf3a90b638f9c19fdea8016d3ee..f60396f24650f12a76083b84685050a5e201df3f 100644 (file)
@@ -2201,9 +2201,8 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt)
         ist = pls->ctx->streams[pls->pkt.stream_index];
         st = pls->main_streams[pls->pkt.stream_index];
 
-        *pkt = pls->pkt;
+        av_packet_move_ref(pkt, &pls->pkt);
         pkt->stream_index = st->index;
-        reset_packet(&c->playlists[minplaylist]->pkt);
 
         if (pkt->dts != AV_NOPTS_VALUE)
             c->cur_timestamp = av_rescale_q(pkt->dts,