raspivid: Also flush PTS file if flush is enabled

This commit is contained in:
Simon Kadisch
2023-08-09 00:15:48 +00:00
committed by Phil Elwell
parent cc1ca18fb0
commit 44a3953fd1

View File

@@ -1393,6 +1393,7 @@ static void encoder_buffer_callback(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buf
pData->pstate->lasttime = buffer->pts;
pts = buffer->pts - pData->pstate->starttime;
fprintf(pData->pts_file_handle, "%lld.%03lld\n", pts/1000, pts%1000);
if(pData->flush_buffers) fflush(pData->pts_file_handle);
pData->pstate->frame++;
}
}