[FFmpeg-devel] [PATCH] ffplay: Only av_dup_packet when required.
Marton Balint
cus at passwd.hu
Sun Mar 3 02:33:07 CET 2013
On Sat, 2 Mar 2013, Robert Nagy wrote:
>> From 6ddcc71e96774d900f092854d9876326bd1713a0 Mon Sep 17 00:00:00 2001
> From: Robert Nagy <ronag89 at gmail.com>
> Date: Sat, 2 Mar 2013 22:45:54 +0100
> Subject: [PATCH] ffplay: Only av_dup_packet when required.
>
> ---
> ffplay.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ffplay.c b/ffplay.c
> index 7276c4a..14f2bd8 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -362,7 +362,7 @@ static int packet_queue_put(PacketQueue *q, AVPacket
> *pkt)
> int ret;
>
> /* duplicate the packet */
> - if (pkt != &flush_pkt && av_dup_packet(pkt) < 0)
> + if (pkt != &flush_pkt && !pkt->destruct && av_dup_packet(pkt) < 0)
Does this really make a difference? Where? As far as I see, if
pkt->destruct is set, av_dup_packet is a no op. Or am I missing something?
Regards,
Marton
More information about the ffmpeg-devel
mailing list