mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-11 18:09:36 +00:00
lavc/utils: disallow zero sized packets with data set in avcodec_send_packet
Reviewed-by: wm4 <nfxjfg@googlemail.com> Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
f4e692a0e9
commit
2face3e7b5
@ -2819,6 +2819,9 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke
|
||||
if (avctx->internal->draining)
|
||||
return AVERROR_EOF;
|
||||
|
||||
if (avpkt && !avpkt->size && avpkt->data)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
if (!avpkt || !avpkt->size) {
|
||||
avctx->internal->draining = 1;
|
||||
avpkt = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user