avformat/sapdec: Check ffurl_get_file_handle() for error

Fixes: CID1604506 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-07-11 20:44:45 +02:00
parent e83e246504
commit 3e305a0e70
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 3 additions and 0 deletions

View File

@ -198,6 +198,9 @@ static int sap_fetch_packet(AVFormatContext *s, AVPacket *pkt)
struct pollfd p = {fd, POLLIN, 0};
uint8_t recvbuf[RTP_MAX_PACKET_LENGTH];
if (fd < 0)
return fd;
if (sap->eof)
return AVERROR_EOF;