diff options
author | James Almer <jamrial@gmail.com> | 2021-04-10 22:50:48 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-16 11:08:24 -0300 |
commit | ab7a0a4cc23e3ff222714a58ce24fc6287a68585 (patch) | |
tree | 87a14faa2b5b9cd7c78e57bbe5770c4d34f5effb /libavcodec | |
parent | 39eafd0b2e1c5666029390ac57f3fe5441d8fc7e (diff) | |
download | ffmpeg-ab7a0a4cc23e3ff222714a58ce24fc6287a68585.tar.gz |
avcodec/libwebpenc_animencoder: stop propagating bogus empty packets
Packets must have at least one of data or side_data. If none are available,
then got_packet must not be signaled.
The generic encode code already discarded these empty packets, but it's better
just not propagating them at all.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libwebpenc_animencoder.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/libwebpenc_animencoder.c b/libavcodec/libwebpenc_animencoder.c index 7f35a0b939..633af2e925 100644 --- a/libavcodec/libwebpenc_animencoder.c +++ b/libavcodec/libwebpenc_animencoder.c @@ -102,10 +102,9 @@ static int libwebp_anim_encode_frame(AVCodecContext *avctx, AVPacket *pkt, goto end; } - pkt->pts = pkt->dts = frame->pts; s->prev_frame_pts = frame->pts; // Save for next frame. ret = 0; - *got_packet = 1; + *got_packet = 0; end: WebPPictureFree(pic); |