[FFmpeg-cvslog] avformat/hls: Use av_packet_move_ref() for packet ownership transfer

Andreas Rheinhardt git at videolan.org
Mon Dec 23 09:40:05 EET 2019


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Tue Dec  3 11:27:38 2019 +0100| [5b42d3357120a338e506acbd2a0081a0702aa166] | committer: Steven Liu

avformat/hls: Use av_packet_move_ref() for packet ownership transfer

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5b42d3357120a338e506acbd2a0081a0702aa166
---

 libavformat/hls.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 21353bbad7..f60396f246 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -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,



More information about the ffmpeg-cvslog mailing list