[FFmpeg-devel] [CRASH]

Stefano Sabatini stefano.sabatini-lala at poste.it
Tue Jun 7 23:25:19 CEST 2011


On date Tuesday 2011-06-07 23:08:29 +0200, Etienne Buira encoded:
> On Tue, Jun 07, 2011 at 10:16:51PM +0200, Michael Niedermayer wrote:
> > On Tue, Jun 07, 2011 at 03:20:42PM +0200, Etienne Buira wrote:
> > > On Tue, Jun 07, 2011 at 01:14:46PM +0100, JULIAN GARDNER wrote:
> > > > 
> > > > Since last nights git pull i have been getting a crash (see error dump at end) at then end of encoding with the following command line
> > > > 
> > > > ./ffmpeg -i Lie.avi -i Lie.srt -vcodec libx264 -scodec ass -f mpegts -y a.ts
> > > > 
> > > > But if i remove the "-vcodec libx264" everything works fine.
> > > > #7  0x086d88a2 in av_free (arg=0x8e9e144) at libavutil/mem.c:152
> > > > #8  av_freep (arg=0x8e9e144) at libavutil/mem.c:159
> > > > #9  0x086d8b87 in av_opt_free (obj=0x400) at libavutil/opt.c:528
> > > > #10 0x0806d9ee in avcodec_close (avctx=0x8e9d900) at libavcodec/utils.c:862
> > > > #11 0x08088e71 in transcode (nb_output_files=<value optimized out>, input_files=<value optimized out>,
> > > >     nb_input_files=<value optimized out>, stream_maps=0x0, nb_stream_maps=0, output_files=<value optimized out>) at ffmpeg.c:2893
> > > > #12 0x08089f8c in main (argc=17, argv=0xbffff704) at ffmpeg.c:4663
> > > > (gdb)
> > > 
> > > Please try attached patch.
> > 
> > locally applied, will push later
> 
> Actually, after looking at the whole tree, I found anoter case where it
> can crash, cleaned up at two other places.

> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> index cf0eb43..8be0192 100644
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -349,13 +349,6 @@ static av_cold void uninit(AVFilterContext *ctx)
>      DrawTextContext *dtext = ctx->priv;
>      int i;
>  
> -    av_freep(&dtext->fontfile);
> -    av_freep(&dtext->text);
> -    av_freep(&dtext->expanded_text);
> -    av_freep(&dtext->fontcolor_string);
> -    av_freep(&dtext->boxcolor_string);
> -    av_freep(&dtext->positions);
> -    av_freep(&dtext->shadowcolor_string);
>      av_tree_enumerate(dtext->glyphs, NULL, NULL, glyph_enu_free);
>      av_tree_destroy(dtext->glyphs);
>      dtext->glyphs = 0;

Uh, why this? As far as I know av_opt_free() is not (yet?) used in
libavfilter.

> diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
> index 6c5c831..f4f9e07 100644
> --- a/libavfilter/vsrc_movie.c
> +++ b/libavfilter/vsrc_movie.c
> @@ -189,7 +189,6 @@ static av_cold void uninit(AVFilterContext *ctx)
>      MovieContext *movie = ctx->priv;
>  
>      av_free(movie->file_name);
> -    av_free(movie->format_name);
>      if (movie->codec_ctx)
>          avcodec_close(movie->codec_ctx);
>      if (movie->format_ctx)

leak?
-- 
FFmpeg = Fascinating Fanciful Mean Problematic Empowered Guru


More information about the ffmpeg-devel mailing list