[FFmpeg-cvslog] avcodec/mlpenc: fix removal of packet timestamp/size from queue
Paul B Mahol
git at videolan.org
Sun Sep 5 13:16:21 EEST 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep 5 12:10:11 2021 +0200| [4ca9877b91e58336a5fdababb7ccfe8399f17938] | committer: Paul B Mahol
avcodec/mlpenc: fix removal of packet timestamp/size from queue
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4ca9877b91e58336a5fdababb7ccfe8399f17938
---
libavcodec/mlpenc.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index 7920eb76df..869c1a9951 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -206,8 +206,6 @@ typedef struct MLPEncodeContext {
int shorten_by;
- int64_t pts;
-
LPCContext lpc_ctx;
} MLPEncodeContext;
@@ -2300,18 +2298,13 @@ input_and_return:
no_data_left:
- if (ctx->afq.frame_count > 0) {
- ff_af_queue_remove(&ctx->afq, avctx->frame_size, &avpkt->pts,
- &avpkt->duration);
- ctx->pts = avpkt->pts + avpkt->duration;
- } else {
- avpkt->pts = ctx->pts;
- ctx->pts += avctx->frame_size;
- }
if (!frame)
avctx->frame_number++;
if (bytes_written > 0) {
+ ff_af_queue_remove(&ctx->afq, avctx->frame_size, &avpkt->pts,
+ &avpkt->duration);
+
avpkt->size = bytes_written;
*got_packet = 1;
} else {
More information about the ffmpeg-cvslog
mailing list