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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue