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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2019-12-03 11:27:38 +01:00 committed by Steven Liu
parent 74a8be3546
commit 5b42d33571
1 changed files with 1 additions and 2 deletions

View 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,