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:
parent
57d63d43cf
commit
478607668c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user