mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
vfwcap: Reorder some code to simplify next patch.
Originally committed as revision 19543 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d40b45e8b0
commit
42477de59e
@ -319,19 +319,18 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
|||||||
codec->codec_type = CODEC_TYPE_VIDEO;
|
codec->codec_type = CODEC_TYPE_VIDEO;
|
||||||
codec->width = width;
|
codec->width = width;
|
||||||
codec->height = height;
|
codec->height = height;
|
||||||
codec->codec_id = CODEC_ID_RAWVIDEO;
|
|
||||||
codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);
|
codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);
|
||||||
if(biCompression == BI_RGB)
|
|
||||||
codec->bits_per_coded_sample = biBitCount;
|
|
||||||
|
|
||||||
av_set_pts_info(st, 32, 1, 1000);
|
|
||||||
|
|
||||||
if(codec->pix_fmt == PIX_FMT_NONE) {
|
if(codec->pix_fmt == PIX_FMT_NONE) {
|
||||||
av_log(s, AV_LOG_ERROR, "Unknown compression type. "
|
av_log(s, AV_LOG_ERROR, "Unknown compression type. "
|
||||||
"Please report verbose (-v 9) debug information.\n");
|
"Please report verbose (-v 9) debug information.\n");
|
||||||
vfw_read_close(s);
|
vfw_read_close(s);
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
codec->codec_id = CODEC_ID_RAWVIDEO;
|
||||||
|
if(biCompression == BI_RGB)
|
||||||
|
codec->bits_per_coded_sample = biBitCount;
|
||||||
|
|
||||||
|
av_set_pts_info(st, 32, 1, 1000);
|
||||||
|
|
||||||
ctx->mutex = CreateMutex(NULL, 0, NULL);
|
ctx->mutex = CreateMutex(NULL, 0, NULL);
|
||||||
if(!ctx->mutex) {
|
if(!ctx->mutex) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user