OSDN Git Service

af_resample: Set the number of samples in the last frame
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 1 Aug 2014 23:58:07 +0000 (01:58 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 20 Jun 2015 09:18:01 +0000 (12:18 +0300)
Otherwise trailing zeroes would appear.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavfilter/af_resample.c
tests/fate/libavresample.mak

index fbe6105..b125d25 100644 (file)
@@ -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);
     }
index 4a48c9c..65a0e1e 100644 (file)
@@ -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)