comparison libmpdemux/muxer_lavf.c @ 35589:ba53cfe2547b

lavf muxer: set up stream aspect.
author reimar
date Sat, 15 Dec 2012 19:33:19 +0000
parents 56081c772b4a
children bab4ce2b0d01
comparison
equal deleted inserted replaced
35588:dc5355a5b42f 35589:ba53cfe2547b
226 ctx->width = stream->bih->biWidth; 226 ctx->width = stream->bih->biWidth;
227 ctx->height = stream->bih->biHeight; 227 ctx->height = stream->bih->biHeight;
228 ctx->bit_rate = 800000; 228 ctx->bit_rate = 800000;
229 ctx->time_base.den = stream->h.dwRate; 229 ctx->time_base.den = stream->h.dwRate;
230 ctx->time_base.num = stream->h.dwScale; 230 ctx->time_base.num = stream->h.dwScale;
231 if (stream->aspect)
232 ctx->sample_aspect_ratio =
233 spriv->avstream->sample_aspect_ratio = av_d2q(stream->aspect * ctx->height / ctx->width, 255);
234
231 if(stream->bih->biSize > sizeof(*stream->bih)) 235 if(stream->bih->biSize > sizeof(*stream->bih))
232 { 236 {
233 ctx->extradata_size = stream->bih->biSize - sizeof(*stream->bih); 237 ctx->extradata_size = stream->bih->biSize - sizeof(*stream->bih);
234 ctx->extradata = av_malloc(ctx->extradata_size); 238 ctx->extradata = av_malloc(ctx->extradata_size);
235 if(ctx->extradata != NULL) 239 if(ctx->extradata != NULL)