Commit 05a2ce93 authored by Paul B Mahol's avatar Paul B Mahol

avformat/y4m: do not try to seek if pts is less than 0

Fixes #8193.
parent 0728d644
......@@ -326,6 +326,8 @@ static int yuv4_read_seek(AVFormatContext *s, int stream_index,
if (flags & AVSEEK_FLAG_BACKWARD)
pts = FFMAX(0, pts - 1);
if (pts < 0)
return -1;
pos = pts * s->packet_size;
if (avio_seek(s->pb, pos + s->internal->data_offset, SEEK_SET) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment