mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
vfwcap: prefer "framerate_q" over "fps" in vfw_read_header()
The variable is used for containing the parsed value of framerate, using a lexically consistent name eases readability/understanding. Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
e60068baeb
commit
a4bda40544
@ -249,7 +249,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
DWORD biCompression;
|
DWORD biCompression;
|
||||||
WORD biBitCount;
|
WORD biBitCount;
|
||||||
int ret;
|
int ret;
|
||||||
AVRational fps;
|
AVRational framerate_q;
|
||||||
|
|
||||||
if (!strcmp(s->filename, "list")) {
|
if (!strcmp(s->filename, "list")) {
|
||||||
for (devnum = 0; devnum <= 9; devnum++) {
|
for (devnum = 0; devnum <= 9; devnum++) {
|
||||||
@ -269,7 +269,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
|
|
||||||
#if FF_API_FORMAT_PARAMETERS
|
#if FF_API_FORMAT_PARAMETERS
|
||||||
if (ap->time_base.num)
|
if (ap->time_base.num)
|
||||||
fps = (AVRational){ap->time_base.den, ap->time_base.num};
|
framerate_q = (AVRational){ap->time_base.den, ap->time_base.num};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ctx->hwnd = capCreateCaptureWindow(NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0);
|
ctx->hwnd = capCreateCaptureWindow(NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0);
|
||||||
@ -369,7 +369,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
|
|
||||||
cparms.fYield = 1; // Spawn a background thread
|
cparms.fYield = 1; // Spawn a background thread
|
||||||
cparms.dwRequestMicroSecPerFrame =
|
cparms.dwRequestMicroSecPerFrame =
|
||||||
(fps.den*1000000) / fps.num;
|
(framerate_q.den*1000000) / framerate_q.num;
|
||||||
cparms.fAbortLeftMouse = 0;
|
cparms.fAbortLeftMouse = 0;
|
||||||
cparms.fAbortRightMouse = 0;
|
cparms.fAbortRightMouse = 0;
|
||||||
cparms.fCaptureAudio = 0;
|
cparms.fCaptureAudio = 0;
|
||||||
@ -381,7 +381,7 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
goto fail_io;
|
goto fail_io;
|
||||||
|
|
||||||
codec = st->codec;
|
codec = st->codec;
|
||||||
codec->time_base = (AVRational){fps.den, fps.num};
|
codec->time_base = (AVRational){framerate_q.den, framerate_q.num};
|
||||||
codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||||
codec->width = bi->bmiHeader.biWidth;
|
codec->width = bi->bmiHeader.biWidth;
|
||||||
codec->height = bi->bmiHeader.biHeight;
|
codec->height = bi->bmiHeader.biHeight;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user