diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2009-07-30 17:25:15 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2009-07-30 17:25:15 +0000 |
commit | 42477de59eaec3c4055a31cfdc0247ccff8eb8b3 (patch) | |
tree | 9f0f733e90dba354aa37a11dcbb772355b3e1ba2 /libavdevice/vfwcap.c | |
parent | d40b45e8b0a05e87a2e0c61403fe65534a5158d7 (diff) | |
download | ffmpeg-42477de59eaec3c4055a31cfdc0247ccff8eb8b3.tar.gz |
vfwcap: Reorder some code to simplify next patch.
Originally committed as revision 19543 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/vfwcap.c')
-rw-r--r-- | libavdevice/vfwcap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index eb0558858e..72d5f397c3 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -319,19 +319,18 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap) codec->codec_type = CODEC_TYPE_VIDEO; codec->width = width; codec->height = height; - codec->codec_id = CODEC_ID_RAWVIDEO; 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) { av_log(s, AV_LOG_ERROR, "Unknown compression type. " "Please report verbose (-v 9) debug information.\n"); vfw_read_close(s); 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); if(!ctx->mutex) { |