diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-01 15:13:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-01 15:13:07 +0200 |
commit | 599866f5d5e6d27657a3f4f5d4c1bc8785143c99 (patch) | |
tree | 3a5f0ffeecd3842ea29830db371f52dda1ca4748 /libavfilter | |
parent | ce841bc0326327b73659d7157ebcf25f235ef470 (diff) | |
parent | 52853077ee49db8ecb6f83d0f9a177708b5d93a6 (diff) | |
download | ffmpeg-599866f5d5e6d27657a3f4f5d4c1bc8785143c99.tar.gz |
Merge remote-tracking branch 'cigaes/master'
* cigaes/master:
lavfi/af_asetnsamples: fix EOF handling.
lavu/opt: make sure av_opt_set_bin() handles NULL/0.
lavd/v4l2: fully init an ioctl argument.
lavfi: detect merge failure for unknown layouts.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_asetnsamples.c | 5 | ||||
-rw-r--r-- | libavfilter/formats.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c index 08e5279989..e004453642 100644 --- a/libavfilter/af_asetnsamples.c +++ b/libavfilter/af_asetnsamples.c @@ -171,9 +171,8 @@ static int request_frame(AVFilterLink *outlink) } while (!asns->req_fullfilled && ret >= 0); if (ret == AVERROR_EOF) { - do { - ret = push_samples(outlink); - } while (ret > 0); + ret = push_samples(outlink); + return ret < 0 ? ret : ret > 0 ? 0 : AVERROR_EOF; } return ret; diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 43718e4655..ea2462793e 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -184,6 +184,10 @@ AVFilterChannelLayouts *ff_merge_channel_layouts(AVFilterChannelLayouts *a, for (i = j = 0; i < b->nb_channel_layouts; i++) if (KNOWN(b->channel_layouts[i])) b->channel_layouts[j++] = b->channel_layouts[i]; + /* Not optimal: the unknown layouts of b may become known after + another merge. */ + if (!j) + return NULL; b->nb_channel_layouts = j; } MERGE_REF(b, a, channel_layouts, AVFilterChannelLayouts, fail); |