diff options
author | Clément Bœsch <clement.boesch@smartjog.com> | 2012-02-01 18:53:54 +0400 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-02-02 17:31:18 +0400 |
commit | d50a4c4a5b5c7f6fb563fd4fc0c9deb4a5704a10 (patch) | |
tree | bcd98ad9bfb1e6bad23cf75174832ab32db7a937 /libavfilter | |
parent | 85c66793d793cc1cf5b087b6be7b9c04ae9ce9d1 (diff) |
lavfi/amerge: copy ref props after filtering samples.
This fixes various issues with ffmpeg -ss and -t.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_amerge.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index 736379c449..c9b0f21fd1 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -186,6 +186,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples) { AVFilterContext *ctx = inlink->dst; AMergeContext *am = ctx->priv; + AVFilterLink *const outlink = ctx->outputs[0]; int input_number = inlink == ctx->inputs[1]; struct amerge_queue *inq = &am->queue[input_number]; int nb_samples, ns, i; @@ -214,6 +215,12 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples) ins[i] = (*inbuf[i])->data[0] + am->queue[i].pos * am->nb_in_ch[i] * am->bps; } + + avfilter_copy_buffer_ref_props(outbuf, *inbuf[0]); + outbuf->audio->nb_samples = nb_samples; + outbuf->audio->channel_layout = outlink->channel_layout; + outbuf->audio->planar = outlink->planar; + while (nb_samples) { ns = nb_samples; for (i = 0; i < 2; i++) |