diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-07 04:17:30 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-07 04:17:30 +0400 |
commit | 46a47077eee2d7755e17f6557903f383cdfe1b8b (patch) | |
tree | 2f42fe2b5bcd4f3e71a24bc9126ce73ecc665a74 /libavfilter/af_amix.c | |
parent | a6da14ec3cbe009b2f6fe3eaaa4865e8c8f5ef1a (diff) | |
parent | 5adc829eb0787682111ca063bfc2b31558999dff (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
configure: add functions for testing code fragments
af_amix: avoid spurious EAGAIN.
af_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.
af_amix: only consider negative return codes as errors.
avconv: use only meaningful timestamps in start time check.
avconv: fix the check for -ss as an output option.
mss3: add forgotten 'static' qualifier for private table
lavc: options: add planar names for request_sample_fmt
flacdec: add planar output support
flvdec: Treat all nellymoser versions as the same codec
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/af_amix.c')
-rw-r--r-- | libavfilter/af_amix.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index e70c6b6f08..6dad3db0d0 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -354,7 +354,7 @@ static int request_samples(AVFilterContext *ctx, int min_samples) s->input_state[i] = INPUT_OFF; continue; } - } else if (ret) + } else if (ret < 0) return ret; } return 0; @@ -403,7 +403,7 @@ static int request_frame(AVFilterLink *outlink) available_samples = get_available_samples(s); if (!available_samples) - return 0; + return AVERROR(EAGAIN); return output_frame(outlink, available_samples); } @@ -416,7 +416,7 @@ static int request_frame(AVFilterLink *outlink) return AVERROR_EOF; else return AVERROR(EAGAIN); - } else if (ret) + } else if (ret < 0) return ret; } av_assert0(s->frame_list->nb_frames > 0); @@ -431,10 +431,12 @@ static int request_frame(AVFilterLink *outlink) ret = calc_active_inputs(s); if (ret < 0) return ret; + } + if (s->active_inputs > 1) { available_samples = get_available_samples(s); if (!available_samples) - return 0; + return AVERROR(EAGAIN); available_samples = FFMIN(available_samples, wanted_samples); } else { available_samples = wanted_samples; |