Commit 2fede7bd authored by Jean-Paul Saman's avatar Jean-Paul Saman

dvbinfo: empty entire capture fifo on closing

If the capture thread finishes first, then empty the capture fifo
before exiting the application. The previous logic would just stop
the processing thread when the capture thread has ended. This
resulted in dvbinfo skipping the rest of the capture file and give
an incomplete result as summary.
parent 1a8e62c8
......@@ -233,12 +233,21 @@ static void dvbinfo_process(dvbinfo_capture_t *capture)
exit(EXIT_FAILURE);
}
while (!b_error && capture->b_alive)
while (!b_error)
{
/* Wait till fifo has emptied */
if (!capture->b_alive && (fifo_count(capture->fifo) == 0))
break;
/* Wait for data to arrive */
buffer = fifo_pop(capture->fifo);
if (buffer == NULL)
break;
{
if (capture->b_alive)
continue;
else
break;
}
if (param->output)
{
......
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