X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Favfiltergraph.c;h=2fe4f0b0f9b7ea6b2181a8356e4bcb15d0fe4c8a;hb=726dbc57f8162ce82c245a2fdfef2fa074c99dc4;hp=4cc68924043176354473bd0862aa50169b94eeb5;hpb=217ad40aef9eeeff4e805dec3e980fb16aec3345;p=ffmpeg diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 4cc68924043..2fe4f0b0f9b 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -419,8 +419,10 @@ static int can_merge_formats(AVFilterFormats *a_arg, av_freep(&ret); return 1; } else { - av_freep(&a->formats); - av_freep(&b->formats); + if (a) + av_freep(&a->formats); + if (b) + av_freep(&b->formats); av_freep(&a); av_freep(&b); return 0; @@ -679,6 +681,7 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref) if (link->type == AVMEDIA_TYPE_VIDEO) { if(ref && ref->type == AVMEDIA_TYPE_VIDEO){ + //FIXME: This should check for AV_PIX_FMT_FLAG_ALPHA after PAL8 pixel format without alpha is implemented int has_alpha= av_pix_fmt_desc_get(ref->format)->nb_components % 2 == 0; enum AVPixelFormat best= AV_PIX_FMT_NONE; int i;