Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-31 23:27:42 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-05-31 23:27:42 +0400
commit5afdb3e6b1a06a897ec6d4fe5da1619ae8bef6be (patch)
tree1aad51e15c06538510f1597af7e05bbedbcc94e1 /libavfilter
parentb7d14883939e756cbda376c66552be9d843910a0 (diff)
parent0fcf3013c4aa4f70c39899b7b3bd8c451fe2e493 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: fate: Fix fate-ac3-fixed-encode for pre-ssse3 x86 machines http: Pass the proper return code of net IO operations http: Add 'post_data', a new option which sets custom HTTP post data lavfi: amix: check active input count before calling request_samples vp8: move block coeff arithcoder on stack. mp3/ac3 probe: search for PES headers to prevent probing MPEG-PS as MP3. Conflicts: libavformat/ac3dec.c libavformat/mp3dec.c tests/fate/ac3.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_amix.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 3399b7c051..d4af9a4234 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -389,6 +389,10 @@ static int request_frame(AVFilterLink *outlink)
int ret;
int wanted_samples, available_samples;
+ ret = calc_active_inputs(s);
+ if (ret < 0)
+ return ret;
+
if (s->input_state[0] == INPUT_OFF) {
ret = request_samples(ctx, 1);
if (ret < 0)
@@ -419,15 +423,16 @@ static int request_frame(AVFilterLink *outlink)
av_assert0(s->frame_list->nb_frames > 0);
wanted_samples = frame_list_next_frame_size(s->frame_list);
- ret = request_samples(ctx, wanted_samples);
- if (ret < 0)
- return ret;
-
- ret = calc_active_inputs(s);
- if (ret < 0)
- return ret;
if (s->active_inputs > 1) {
+ ret = request_samples(ctx, wanted_samples);
+ if (ret < 0)
+ return ret;
+
+ ret = calc_active_inputs(s);
+ if (ret < 0)
+ return ret;
+
available_samples = get_available_samples(s);
if (!available_samples)
return 0;