[FFmpeg-devel] [PATCH 3/3] lavd/xv: free resources on errors

Timothy Gu timothygu99 at gmail.com
Thu Nov 14 00:41:30 CET 2013


On Nov 13, 2013 2:42 PM, "Lukasz Marek" <lukasz.m.luki at gmail.com> wrote:
>
> write_trailer callback leave not freed resources on errors.
>
> Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> ---
>  libavdevice/xv.c |   11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/libavdevice/xv.c b/libavdevice/xv.c
> index bfa6ff5..008e818 100644
> --- a/libavdevice/xv.c
> +++ b/libavdevice/xv.c
> @@ -120,15 +120,13 @@ static int xv_write_header(AVFormatContext *s)
>                                       xv->window_x, xv->window_y,
>                                       xv->window_width, xv->window_height,
>                                       0, 0, 0);
> -    if (!xv->window_title) {
> -        if (!(xv->window_title = av_strdup(s->filename)))
> -            return AVERROR(ENOMEM);
> -    }

> -    XStoreName(xv->display, xv->window, xv->window_title);
> +    XStoreName(xv->display, xv->window, xv->window_title ?
xv->window_title : s->filename);

Seems to be unrelated.

[...]

Timothy


More information about the ffmpeg-devel mailing list