diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-03-02 20:56:01 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-03-03 09:28:15 +0100 |
commit | dd2ea5cbfb30a0a2ff112d6e48adc42a30484fe9 (patch) | |
tree | 03f0510f5d77afbb1ebda4b999da2749bcf76b88 /libavformat/yuv4mpegdec.c | |
parent | ecba35bbe305c022d59da2d7bf066e3325693c26 (diff) | |
download | ffmpeg-dd2ea5cbfb30a0a2ff112d6e48adc42a30484fe9.tar.gz |
avformat/yuv4mpegdec: fix seeking for partial files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/yuv4mpegdec.c')
-rw-r--r-- | libavformat/yuv4mpegdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c index ea1ae25599..db07566eb6 100644 --- a/libavformat/yuv4mpegdec.c +++ b/libavformat/yuv4mpegdec.c @@ -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; } |