diff --git a/ffplay.c b/ffplay.c index 842939a777..d6b17c206c 100644 --- a/ffplay.c +++ b/ffplay.c @@ -90,7 +90,7 @@ const int program_birth_year = 2003; /* TODO: We assume that a decoded and resampled frame fits into this buffer */ #define SAMPLE_ARRAY_SIZE (8 * 65536) -static int sws_flags = SWS_BICUBIC; +static int64_t sws_flags = SWS_BICUBIC; typedef struct MyAVPacketList { AVPacket pkt; @@ -1582,7 +1582,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts1, int64_ av_picture_copy(&pict, (AVPicture *)src_frame, src_frame->format, vp->width, vp->height); #else - sws_flags = av_get_int(sws_opts, "sws_flags", NULL); + av_opt_get_int(sws_opts, "sws_flags", 0, &sws_flags); is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx, vp->width, vp->height, src_frame->format, vp->width, vp->height, AV_PIX_FMT_YUV420P, sws_flags, NULL, NULL, NULL); @@ -1732,7 +1732,7 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c if (!buffersink_params) return AVERROR(ENOMEM); - snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); + snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%"PRId64, sws_flags); graph->scale_sws_opts = av_strdup(sws_flags_str); snprintf(buffersrc_args, sizeof(buffersrc_args),