Mercurial > libavformat.hg
comparison nuv.c @ 3597:cfa94f80be53 libavformat
aspect stored in nuv files must be converted from display- to sample-aspect.
Patch by elupus (elupus ecce se)
author | reimar |
---|---|
date | Thu, 24 Jul 2008 18:40:43 +0000 |
parents | 771cf9f79fd6 |
children | 50106b4dd6ba |
comparison
equal
deleted
inserted
replaced
3596:1b3a50077124 | 3597:cfa94f80be53 |
---|---|
154 vst->codec->codec_type = CODEC_TYPE_VIDEO; | 154 vst->codec->codec_type = CODEC_TYPE_VIDEO; |
155 vst->codec->codec_id = CODEC_ID_NUV; | 155 vst->codec->codec_id = CODEC_ID_NUV; |
156 vst->codec->width = width; | 156 vst->codec->width = width; |
157 vst->codec->height = height; | 157 vst->codec->height = height; |
158 vst->codec->bits_per_sample = 10; | 158 vst->codec->bits_per_sample = 10; |
159 vst->codec->sample_aspect_ratio = av_d2q(aspect, 10000); | 159 vst->codec->sample_aspect_ratio = av_d2q(aspect * height / width, 10000); |
160 vst->r_frame_rate = av_d2q(fps, 60000); | 160 vst->r_frame_rate = av_d2q(fps, 60000); |
161 av_set_pts_info(vst, 32, 1, 1000); | 161 av_set_pts_info(vst, 32, 1, 1000); |
162 } else | 162 } else |
163 ctx->v_id = -1; | 163 ctx->v_id = -1; |
164 | 164 |