avfilter_draw_slice() is already called in the end_frame() callback,
this avoids multiple calls. This is done by adding a null draw_slice()
callback.
In particular fix crash occurring with -vf transpose=3,hflip, fix trac
issue #371.
(cherry picked from commit d9c23a0d5a56488b146eef17a19a9b47643be333)
... | ... |
@@ -195,6 +195,8 @@ static void end_frame(AVFilterLink *inlink) |
195 | 195 |
avfilter_unref_buffer(outpic); |
196 | 196 |
} |
197 | 197 |
|
198 |
+static void null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) { } |
|
199 |
+ |
|
198 | 200 |
AVFilter avfilter_vf_transpose = { |
199 | 201 |
.name = "transpose", |
200 | 202 |
.description = NULL_IF_CONFIG_SMALL("Transpose input video."), |
... | ... |
@@ -207,6 +209,7 @@ AVFilter avfilter_vf_transpose = { |
207 | 207 |
.inputs = (AVFilterPad[]) {{ .name = "default", |
208 | 208 |
.type = AVMEDIA_TYPE_VIDEO, |
209 | 209 |
.start_frame = start_frame, |
210 |
+ .draw_slice = null_draw_slice, |
|
210 | 211 |
.end_frame = end_frame, |
211 | 212 |
.min_perms = AV_PERM_READ, }, |
212 | 213 |
{ .name = NULL}}, |