1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Stefano Sabatini 2011-03-12 14:46:16 +01:00 committed by Michael Niedermayer
parent 57d63d43cf
commit 478607668c

View File

@ -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)