aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-01-11 22:05:48 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-01-11 22:05:48 +0000
commitb9609848f359d2cfc6a483d0557421427a878039 (patch)
tree36fedab38b6d1da335ef792c5cf2ce04ceb8d288 /libavfilter/avfilter.c
parentb507ebd1792da5e44088ddcab315b41cc500695b (diff)
downloadffmpeg-b9609848f359d2cfc6a483d0557421427a878039.tar.gz
Implement the avfilter_default_draw_slice() handler and use it in
avfilter_draw_slice() when the draw_slice callback is not defined in the input pad. Originally committed as revision 16554 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 218a83bfb3..283fd0aa4a 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -250,6 +250,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h)
{
uint8_t *src[4], *dst[4];
int i, j, hsub, vsub;
+ void (*draw_slice)(AVFilterLink *, int, int);
/* copy the slice if needed for permission reasons */
if(link->srcpic) {
@@ -279,8 +280,9 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h)
}
}
- if(link_dpad(link).draw_slice)
- link_dpad(link).draw_slice(link, y, h);
+ if(!(draw_slice = link_dpad(link).draw_slice))
+ draw_slice = avfilter_default_draw_slice;
+ draw_slice(link, y, h);
}
AVFilter *avfilter_get_by_name(const char *name)