History

avfilter/avfiltergraph: fix -Wunused-result warnings

Commit bf0d2d6030c239f91e0368a20fb2dc0705bfec99 introduced av_warn_unused_result to avfilter/formats, whose associated warnings were mostly fixed in 6aaac24d72a7da631173209841a3944fcb4a3309. This fixes the issues in avfilter/avfiltergraph. Tested with FATE.

Ganesh Ajjanagadde committed 11 years ago

Commit 38355541 parent 27d23ae1 file · +13 −6Browse files

Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfiltergraph.c+13−6
@@ -745,7 +745,8 @@ do { \ · 744 unmodified lines
745 fmts = out_link->in_ ## list; \745 fmts = out_link->in_ ## list; \
746 \746 \
747 if (!out_link->in_ ## list->nb) { \747 if (!out_link->in_ ## list->nb) { \
748 add_format(&out_link->in_ ##list, fmt); \748 if ((ret = add_format(&out_link->in_ ##list, fmt)) < 0)\
749 return ret; \
749 ret = 1; \750 ret = 1; \
750 break; \751 break; \
751 } \752 } \
@@ -811,16 +812,21 @@ static int reduce_formats_on_filter(AVFilterContext *filter) · 59 unmodified lines
811 return ret;812 return ret;
812}813}
813 814
814static void reduce_formats(AVFilterGraph *graph)815static int reduce_formats(AVFilterGraph *graph)
815{816{
816 int i, reduced;817 int i, reduced, ret;
817 818
818 do {819 do {
819 reduced = 0;820 reduced = 0;
820 821
821 for (i = 0; i < graph->nb_filters; i++)822 for (i = 0; i < graph->nb_filters; i++) {
822 reduced |= reduce_formats_on_filter(graph->filters[i]);823 if ((ret = reduce_formats_on_filter(graph->filters[i])) < 0)
824 return ret;
825 reduced |= ret;
826 }
823 } while (reduced);827 } while (reduced);
828
829 return 0;
824}830}
825 831
826static void swap_samplerates_on_filter(AVFilterContext *filter)832static void swap_samplerates_on_filter(AVFilterContext *filter)
@@ -1138,7 +1144,8 @@ static int graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx) · 311 unmodified lines
1138 /* Once everything is merged, it's possible that we'll still have1144 /* Once everything is merged, it's possible that we'll still have
1139 * multiple valid media format choices. We try to minimize the amount1145 * multiple valid media format choices. We try to minimize the amount
1140 * of format conversion inside filters */1146 * of format conversion inside filters */
1141 reduce_formats(graph);1147 if ((ret = reduce_formats(graph)) < 0)
1148 return ret;
1142 1149
1143 /* for audio filters, ensure the best format, sample rate and channel layout1150 /* for audio filters, ensure the best format, sample rate and channel layout
1144 * is selected */1151 * is selected */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t