aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfiltergraph.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-01-02 15:12:16 +0100
committerNicolas George <nicolas.george@normalesup.org>2013-01-02 16:56:03 +0100
commitb99bef17b44cdefdd91a5e07a4eba6a3cc4ee290 (patch)
tree919da1d7a4fe9a52a8a72a471cf87b44e63b1f4f /libavfilter/avfiltergraph.c
parent82deb0c42e5b35fcca560e3a6fe2ad6fff6ca0be (diff)
downloadffmpeg-b99bef17b44cdefdd91a5e07a4eba6a3cc4ee290.tar.gz
lavfi/avfiltergraph: check pick_format return code.
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r--libavfilter/avfiltergraph.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index f144624256..10f9b7e7d6 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -795,7 +795,8 @@ static int pick_formats(AVFilterGraph *graph)
if (filter->nb_inputs){
for (j = 0; j < filter->nb_inputs; j++){
if(filter->inputs[j]->in_formats && filter->inputs[j]->in_formats->format_count == 1) {
- pick_format(filter->inputs[j], NULL);
+ if ((ret = pick_format(filter->inputs[j], NULL)) < 0)
+ return ret;
change = 1;
}
}
@@ -803,7 +804,8 @@ static int pick_formats(AVFilterGraph *graph)
if (filter->nb_outputs){
for (j = 0; j < filter->nb_outputs; j++){
if(filter->outputs[j]->in_formats && filter->outputs[j]->in_formats->format_count == 1) {
- pick_format(filter->outputs[j], NULL);
+ if ((ret = pick_format(filter->outputs[j], NULL)) < 0)
+ return ret;
change = 1;
}
}
@@ -811,7 +813,8 @@ static int pick_formats(AVFilterGraph *graph)
if (filter->nb_inputs && filter->nb_outputs && filter->inputs[0]->format>=0) {
for (j = 0; j < filter->nb_outputs; j++) {
if(filter->outputs[j]->format<0) {
- pick_format(filter->outputs[j], filter->inputs[0]);
+ if ((ret = pick_format(filter->outputs[j], filter->inputs[0])) < 0)
+ return ret;
change = 1;
}
}