Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread James Almer
On 6/21/2019 11:39 AM, Derek Buitenhuis wrote: > On 21/06/2019 15:26, James Almer wrote: >> Remove the three lines below as well before pushing. They are >> superfluous as av_packet_unref() does the same internally. > > OK. > > The documentation for av_packet_unref says it sets the 'remaining' >

Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread Derek Buitenhuis
On 21/06/2019 15:26, James Almer wrote: > Remove the three lines below as well before pushing. They are > superfluous as av_packet_unref() does the same internally. OK. The documentation for av_packet_unref says it sets the 'remaining' fields to default values, but av_init_packet says it sets

Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread Nicolas George
Derek Buitenhuis (12019-06-21): > The previous instructions is not an unref if it hits one of the breaks > in the loop above. Of course. Sorry for wasting your time. Regards, -- Nicolas George signature.asc Description: PGP signature ___

Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread Derek Buitenhuis
On 21/06/2019 15:26, Nicolas George wrote: > How can the packet not be unreferenced when the very previous > instruction is av_packet_unref()? All the code paths I see either pass > through the existing av_packet_unref() before reaching the new one or > arrive with a blank packet. Am I missing

Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread James Almer
On 6/21/2019 11:15 AM, Derek Buitenhuis wrote: > This packet was not necessarily unreferenced. > > Signed-off-by: Derek Buitenhuis > --- > fftools/ffprobe.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 3becb6330e..dac70ba5a1 100644 >

Re: [FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread Nicolas George
Derek Buitenhuis (12019-06-21): > This packet was not necessarily unreferenced. > > Signed-off-by: Derek Buitenhuis > --- > fftools/ffprobe.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 3becb6330e..dac70ba5a1 100644 > ---

[FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak

2019-06-21 Thread Derek Buitenhuis
This packet was not necessarily unreferenced. Signed-off-by: Derek Buitenhuis --- fftools/ffprobe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 3becb6330e..dac70ba5a1 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2429,6 +2429,8