From c2f861ca42fa1a2fb6f7e85abb7bd44f39c6f2c4 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Tue, 27 Oct 2015 14:35:30 +0100 Subject: Replace remaining occurances of av_free_packet with av_packet_unref --- ffplay.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ffplay.c') diff --git a/ffplay.c b/ffplay.c index e0bcc7c..2c1817e 100644 --- a/ffplay.c +++ b/ffplay.c @@ -432,7 +432,7 @@ static int packet_queue_put(PacketQueue *q, AVPacket *pkt) SDL_UnlockMutex(q->mutex); if (pkt != &flush_pkt && ret < 0) - av_free_packet(pkt); + av_packet_unref(pkt); return ret; } @@ -472,7 +472,7 @@ static void packet_queue_flush(PacketQueue *q) SDL_LockMutex(q->mutex); for (pkt = q->first_pkt; pkt; pkt = pkt1) { pkt1 = pkt->next; - av_free_packet(&pkt->pkt); + av_packet_unref(&pkt->pkt); av_freep(&pkt); } q->last_pkt = NULL; @@ -577,7 +577,7 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) { d->next_pts_tb = d->start_pts_tb; } } while (pkt.data == flush_pkt.data || d->queue->serial != d->pkt_serial); - av_free_packet(&d->pkt); + av_packet_unref(&d->pkt); d->pkt_temp = d->pkt = pkt; d->packet_pending = 1; } @@ -641,7 +641,7 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) { } static void decoder_destroy(Decoder *d) { - av_free_packet(&d->pkt); + av_packet_unref(&d->pkt); } static void frame_queue_unref_item(Frame *vp) @@ -3119,7 +3119,7 @@ static int read_thread(void *arg) } else if (pkt->stream_index == is->subtitle_stream && pkt_in_play_range) { packet_queue_put(&is->subtitleq, pkt); } else { - av_free_packet(pkt); + av_packet_unref(pkt); } } -- cgit v1.1