vo_lavc: remove pointless uint32_t type for int values

params->w/h are int, and the further use of these variables are int. The
uint32_t is probably some refactoring artifact.
This commit is contained in:
wm4 2018-04-19 19:55:13 +02:00
parent c490b3f8ea
commit b3baff399e
1 changed files with 2 additions and 7 deletions

View File

@ -94,8 +94,8 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
struct priv *vc = vo->priv; struct priv *vc = vo->priv;
enum AVPixelFormat pix_fmt = imgfmt2pixfmt(params->imgfmt); enum AVPixelFormat pix_fmt = imgfmt2pixfmt(params->imgfmt);
AVRational aspect = {params->p_w, params->p_h}; AVRational aspect = {params->p_w, params->p_h};
uint32_t width = params->w; int width = params->w;
uint32_t height = params->h; int height = params->h;
if (!vc || vc->shutdown) if (!vc || vc->shutdown)
return -1; return -1;
@ -103,11 +103,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
pthread_mutex_lock(&vo->encode_lavc_ctx->lock); pthread_mutex_lock(&vo->encode_lavc_ctx->lock);
if (vc->stream) { if (vc->stream) {
/* NOTE:
* in debug builds we get a "comparison between signed and unsigned"
* warning here. We choose to ignore that; just because ffmpeg currently
* uses a plain 'int' for these struct fields, it doesn't mean it always
* will */
if (width == vc->codec->width && if (width == vc->codec->width &&
height == vc->codec->height) { height == vc->codec->height) {
if (aspect.num != vc->codec->sample_aspect_ratio.num || if (aspect.num != vc->codec->sample_aspect_ratio.num ||