Fix aspect ratio handling in qplayvid
This commit is contained in:
parent
ea644d993a
commit
418e8d7fa7
1 changed files with 5 additions and 5 deletions
|
@ -672,11 +672,11 @@ void *display_thread(void *arg)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
float aspect = av_q2d(ctx->v_stream->sample_aspect_ratio);
|
||||
if (aspect == 0)
|
||||
aspect = ctx->width / (float)ctx->height;
|
||||
else
|
||||
aspect = 1/aspect;
|
||||
float aspect = ctx->width / (float)ctx->height;
|
||||
float sample_aspect = av_q2d(ctx->v_stream->sample_aspect_ratio);
|
||||
if (sample_aspect != 0)
|
||||
aspect *= sample_aspect;
|
||||
printf("Aspect: %f\n", aspect);
|
||||
|
||||
float iaspect = 1/aspect;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue