aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-10 13:39:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-10 13:39:57 +0200
commitbb23bf8fd7fb4771b0f08a4ee1ba8fe6ca16d14f (patch)
tree26acea0358989cd1754372339944eb789f8ab71c /libavfilter/avfilter.c
parent9b07d34efb122377a0c8735b4008d7fcdf3d1298 (diff)
downloadandroid_external_ffmpeg-bb23bf8fd7fb4771b0f08a4ee1ba8fe6ca16d14f.tar.gz
android_external_ffmpeg-bb23bf8fd7fb4771b0f08a4ee1ba8fe6ca16d14f.tar.bz2
android_external_ffmpeg-bb23bf8fd7fb4771b0f08a4ee1ba8fe6ca16d14f.zip
avfilter/avfilter: fix null pointer dereference with queued ping filters
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 7f69f86ea4..765b37a389 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -427,7 +427,15 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts)
int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags)
{
if(!strcmp(cmd, "ping")){
+ char local_res[256] = {0};
+
+ if (!res) {
+ res = local_res;
+ res_len = sizeof(local_res);
+ }
av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name);
+ if (res == local_res)
+ av_log(filter, AV_LOG_INFO, "%s", res);
return 0;
}else if(!strcmp(cmd, "enable")) {
return set_enable_expr(filter, arg);