projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e208ce
)
lavfi/select: make sure avctx is set before closing it.
author
Clément Bœsch
<ubitux@gmail.com>
Tue, 18 Sep 2012 16:49:09 +0000
(18:49 +0200)
committer
Clément Bœsch
<ubitux@gmail.com>
Tue, 18 Sep 2012 16:52:57 +0000
(18:52 +0200)
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
libavfilter/vf_select.c
patch
|
blob
|
history
diff --git
a/libavfilter/vf_select.c
b/libavfilter/vf_select.c
index
d47876b
..
72af50e
100644
(file)
--- a/
libavfilter/vf_select.c
+++ b/
libavfilter/vf_select.c
@@
-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);
+ }
}
}