Browse Source

lavfi/select: make sure avctx is set before closing it.

This avoid a crash when the filter fails before config_input(),
typically with a syntax error in the next filter:
    select=gt(scene\,.4),select=fail
tags/n1.0
Clément Bœsch 13 years ago
parent
commit
b89c16e73e
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libavfilter/vf_select.c

+ 4
- 2
libavfilter/vf_select.c View File

@@ -383,8 +383,10 @@ static av_cold void uninit(AVFilterContext *ctx)

if (select->do_scene_detect) {
avfilter_unref_bufferp(&select->prev_picref);
avcodec_close(select->avctx);
av_freep(&select->avctx);
if (select->avctx) {
avcodec_close(select->avctx);
av_freep(&select->avctx);
}
}
}



Loading…
Cancel
Save