diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-03-12 14:46:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-03-13 01:41:46 +0100 |
commit | 478607668c8840278c3fdd97382c3fae3f8cd7a2 (patch) | |
tree | aaa30820ba7274068f92ccd9d4fcafd84d947b85 /libavdevice/fbdev.c | |
parent | 57d63d43cf508ae99c3a536d8c63d67cd26c628a (diff) | |
download | ffmpeg-478607668c8840278c3fdd97382c3fae3f8cd7a2.tar.gz |
fbdev: fix check on nanosleep return vale
In fbdev_read_packet(): nanosleep returns -1 in case of errors,
the EINTR check has to be done on errno.
Spotted by Nicolas.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/fbdev.c')
-rw-r--r-- | libavdevice/fbdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c index 0c282f404d..121f02ccff 100644 --- a/libavdevice/fbdev.c +++ b/libavdevice/fbdev.c @@ -204,7 +204,7 @@ static int fbdev_read_packet(AVFormatContext *avctx, AVPacket *pkt) return AVERROR(EAGAIN); ts.tv_sec = delay / 1000000; ts.tv_nsec = (delay % 1000000) * 1000; - while (nanosleep(&ts, &ts) == EINTR); + while (nanosleep(&ts, &ts) < 0 && errno == EINTR); } if ((ret = av_new_packet(pkt, fbdev->frame_size)) < 0) |