diff options
Diffstat (limited to 'src/post/planar/pp.c')
-rw-r--r-- | src/post/planar/pp.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index e13119311..1ce45e381 100644 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -20,12 +20,21 @@ * plugin for ffmpeg libpostprocess */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "xine_internal.h" #include "post.h" #include "xineutils.h" -#include "postprocess.h" #include <pthread.h> +#ifdef HAVE_FFMPEG_AVUTIL_H +# include <postprocess.h> +#else +# include <libpostproc/postprocess.h> +#endif + #define PP_STRING_SIZE 256 /* size of pp mode string (including all options) */ /* plugin class initialization function */ @@ -114,12 +123,9 @@ static char * get_help (void) { ); static char *help = NULL; - if( !help ) { - help = malloc( strlen(help1) + strlen(help2) + strlen(pp_help) + 1); - strcpy(help, help1); - strcat(help, pp_help); - strcat(help, help2); - } + if( !help ) + asprintf(&help, "%s%s%s", help1, help2, pp_help); + return help; } @@ -169,7 +175,7 @@ static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target) { - post_plugin_pp_t *this = (post_plugin_pp_t *)xine_xmalloc(sizeof(post_plugin_pp_t)); + post_plugin_pp_t *this = calloc(1, sizeof(post_plugin_pp_t)); post_in_t *input; xine_post_in_t *input_api; post_out_t *output; |