Commit 5b42d335 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Steven Liu

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

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 74a8be35
...@@ -2201,9 +2201,8 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -2201,9 +2201,8 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt)
ist = pls->ctx->streams[pls->pkt.stream_index]; ist = pls->ctx->streams[pls->pkt.stream_index];
st = pls->main_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; pkt->stream_index = st->index;
reset_packet(&c->playlists[minplaylist]->pkt);
if (pkt->dts != AV_NOPTS_VALUE) if (pkt->dts != AV_NOPTS_VALUE)
c->cur_timestamp = av_rescale_q(pkt->dts, c->cur_timestamp = av_rescale_q(pkt->dts,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment