Dave Rice: > Hi Andreas, > >> On Jun 27, 2020, at 5:09 PM, Andreas Rheinhardt >> <andreas.rheinha...@gmail.com> wrote: >> >> Zhao Zhili: >>> Remove the check on dv_demux since dv_fctx will leak if allocate >>> dv_demux failed. >>> --- >>> libavformat/mov.c | 7 +++---- >>> 1 file changed, 3 insertions(+), 4 deletions(-) >>> >>> diff --git a/libavformat/mov.c b/libavformat/mov.c >>> index adc52de947..f179b6efdd 100644 >>> --- a/libavformat/mov.c >>> +++ b/libavformat/mov.c >>> @@ -7357,10 +7357,9 @@ static int mov_read_close(AVFormatContext *s) >>> av_freep(&sc->coll); >>> } >>> >>> - if (mov->dv_demux) { >>> - avformat_free_context(mov->dv_fctx); >>> - mov->dv_fctx = NULL; >>> - } >>> + av_freep(&mov->dv_demux); >>> + avformat_free_context(mov->dv_fctx); >>> + mov->dv_fctx = NULL; >>> >>> if (mov->meta_keys) { >>> for (i = 1; i < mov->meta_keys_count; i++) { >>> >> Do you have a sample for this? I am asking because there are more >> memleaks related to dv audio and I have a patch [1] for them, but I >> never found any sample for dv in mov/mp4, so it was never applied. > > I’m working with a lot of DV lately. Could you clarify what type of sample > that you are looking for? >
I was looking for samples with data format/Fourcc vdva or dvca to trigger the codepath introduced in b60c04547c9b59685d4cdc09d85efcf750978f60. But I have now found one*, so I don't need your help any more. But thanks for the offer. - Andreas *: https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4671/dir1.tar.bz2 contains such samples (set the enable_drefs option to 1 for it to work). Found via https://github.com/bcoudurier/FFmbc/pull/3 which I strangely didn't find when searching for this last year. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".