avformat/xmv: Handle zero sized packet at end of file

Some XMVs introduce a blank packet at the end of the stream. Previously, we
didn't account for this and returned AVERROR_INVALIDDATA, indicating an issue
with the file. Instead, let's check for this and close out with AVERROR_EOF.
This commit is contained in:
wutno 2025-11-20 16:19:49 -05:00 committed by Marton Balint
parent a8e8daa276
commit f4312ea138

View file

@ -412,7 +412,7 @@ static int xmv_fetch_new_packet(AVFormatContext *s)
AVIOContext *pb = s->pb;
int result;
if (xmv->this_packet_offset == xmv->next_packet_offset)
if (xmv->next_packet_size == 0)
return AVERROR_EOF;
/* Seek to it */