diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2014-08-02 03:58:07 +0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-06-20 12:18:01 +0300 |
commit | c060d046aa2f89c0e601a2dcfbce53f0e36cf498 (patch) | |
tree | fa23c0a69429cf34874b715d87329215299f0952 | |
parent | 6ec688e1bc76dd93151cbca1c340162ae4b10d77 (diff) |
af_resample: Set the number of samples in the last frame
Otherwise trailing zeroes would appear.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavfilter/af_resample.c | 1 | ||||
-rw-r--r-- | tests/fate/libavresample.mak | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index fbe61056e3..b125d25d20 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -202,6 +202,7 @@ static int request_frame(AVFilterLink *outlink) return (ret == 0) ? AVERROR_EOF : ret; } + frame->nb_samples = ret; frame->pts = s->next_pts; return ff_filter_frame(outlink, frame); } diff --git a/tests/fate/libavresample.mak b/tests/fate/libavresample.mak index 4a48c9c042..65a0e1e93d 100644 --- a/tests/fate/libavresample.mak +++ b/tests/fate/libavresample.mak @@ -38,7 +38,7 @@ fate-lavr-resample-$(3)-$(1)-$(2): CMD = avconv -i $(TARGET_PATH)/tests/data/asy fate-lavr-resample-$(3)-$(1)-$(2): CMP = oneoff fate-lavr-resample-$(3)-$(1)-$(2): CMP_UNIT = $(5) fate-lavr-resample-$(3)-$(1)-$(2): FUZZ = 6 -fate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)-v2 +fate-lavr-resample-$(3)-$(1)-$(2): REF = $(SAMPLES)/lavr/lavr-resample-$(3)-$(1)-$(2)-v3 endef $(call CROSS_TEST,$(SAMPLERATES),RESAMPLE,s16p,s16le,s16) |