aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-29 02:29:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-29 02:35:24 +0200
commitbe90f0279d0784c396407e152a8d817953381886 (patch)
treef42c67762d6851b9002e31901632decb0e3b9ebd /libavfilter
parentf3c300d0a4d326c19013d6ecc8ce7d1d25729aa5 (diff)
parent43c0a87279e717c1384314c6da7155c306ee7c60 (diff)
downloadffmpeg-be90f0279d0784c396407e152a8d817953381886.tar.gz
Merge commit '43c0a87279e717c1384314c6da7155c306ee7c60' into release/0.10
* commit '43c0a87279e717c1384314c6da7155c306ee7c60': qdm2: check that the FFT size is a power of 2 indeo3: switch parsing the header to bytestream2 indeo3: check motion vectors. rv10: check that extradata is large enough indeo3: fix data size check lavf: make sure stream probe data gets freed. dfa: check for invalid access in decode_wdlt(). xmv: check audio track parameters validity. bmv: check for len being valid in bmv_decode_frame(). xmv: do not leak memory in the error paths in xmv_read_header() avfiltergraph: check for sws opts being non-NULL before using them. oma: Validate sample rates Prepare for 0.8.7 Release Conflicts: RELEASE libavcodec/indeo3.c libavfilter/avfiltergraph.c libavformat/utils.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfiltergraph.c10
-rw-r--r--libavfilter/graphparser.c3
2 files changed, 10 insertions, 3 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index c97e495c96..ef13443950 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "libavutil/audioconvert.h"
+#include "libavutil/avstring.h"
#include "avfilter.h"
#include "avfiltergraph.h"
#include "internal.h"
@@ -202,6 +203,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
for (j = 0; j < filter->input_count; j++) {
AVFilterLink *link = filter->inputs[j];
+
if (!link) continue;
if (!link->in_formats || !link->out_formats)
@@ -211,8 +213,12 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
!avfilter_merge_formats(link->in_formats, link->out_formats)) {
/* couldn't merge format lists, auto-insert scale filter */
- snprintf(filt_args, sizeof(filt_args), "0:0:%s",
- graph->scale_sws_opts);
+ av_strlcpy(filt_args, "0:0", sizeof(filt_args));
+ if (graph->scale_sws_opts) {
+ av_strlcat(filt_args, ":", sizeof(filt_args));
+ av_strlcat(filt_args, graph->scale_sws_opts, sizeof(filt_args));
+ }
+
if (ret = insert_conv_filter(graph, link, "scale", filt_args))
return ret;
}
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index bd3022e035..f0441a308e 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -121,7 +121,8 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
return ret;
}
- if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
+ if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
+ ctx->scale_sws_opts) {
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
args, ctx->scale_sws_opts);
args = tmp_args;