Commit 47860766 authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 57d63d43
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment