avformat/yuv4mpegdec: fix seeking for partial files

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol
2016-03-02 20:56:01 +01:00
parent ecba35bbe3
commit dd2ea5cbfb
2 changed files with 10 additions and 17 deletions

View File

@@ -307,7 +307,8 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt)
static int yuv4_read_seek(AVFormatContext *s, int stream_index,
int64_t pts, int flags)
{
avio_seek(s->pb, pts * s->packet_size + s->internal->data_offset, SEEK_SET);
if (avio_seek(s->pb, pts * s->packet_size + s->internal->data_offset, SEEK_SET) < 0)
return -1;
return 0;
}