summaryrefslogtreecommitdiff
path: root/libavcodec/audio_frame_queue.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-04 02:36:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-04 02:41:41 +0200
commitb27e2b6e12461b0f60204c7f0145609a6db1697b (patch)
tree60dce44c49f980d2bae257ee0f6cc196aea7fa29 /libavcodec/audio_frame_queue.c
parentb02493e47668e66757b72a7163476e590edfea3a (diff)
downloadffmpeg-b27e2b6e12461b0f60204c7f0145609a6db1697b.tar.gz
afq: update remaining samples variable.
Fixes Ticket1785 (opusenc used this variable) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/audio_frame_queue.c')
-rw-r--r--libavcodec/audio_frame_queue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/audio_frame_queue.c b/libavcodec/audio_frame_queue.c
index cc1fd13c4b..a5c22ce643 100644
--- a/libavcodec/audio_frame_queue.c
+++ b/libavcodec/audio_frame_queue.c
@@ -95,6 +95,7 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts,
if(afq->frames[i].pts != AV_NOPTS_VALUE)
afq->frames[i].pts += n;
}
+ afq->remaining_samples -= removed_samples;
i -= i && afq->frames[i-1].duration;
memmove(afq->frames, afq->frames + i, sizeof(*afq->frames) * (afq->frame_count - i));
afq->frame_count -= i;