From 251f398798967380ce3fa3d1035e98c33e688338 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sun, 17 Jun 2012 12:21:27 +0200 Subject: [PATCH 1/3] ffplay: use key=val syntax for the buffersrc args Fix warning: [src @ ...] Flat options syntax is deprecated, use key=value pairs. Signed-off-by: Marton Balint --- ffplay.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ffplay.c b/ffplay.c index 0644115c8d..afd8f9c111 100644 --- a/ffplay.c +++ b/ffplay.c @@ -1560,7 +1560,8 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags); graph->scale_sws_opts = av_strdup(sws_flags_str); - snprintf(buffersrc_args, sizeof(buffersrc_args), "%d:%d:%d:%d:%d:%d:%d", + snprintf(buffersrc_args, sizeof(buffersrc_args), + "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", codec->width, codec->height, codec->pix_fmt, is->video_st->time_base.num, is->video_st->time_base.den, codec->sample_aspect_ratio.num, codec->sample_aspect_ratio.den); From 8f45c3141c7056772ce9875151e3cf97b72398ea Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sun, 17 Jun 2012 12:21:34 +0200 Subject: [PATCH 2/3] ffplay: rename buffer source instance from "src" to "ffplay_buffer" The new name is more descriptive. Signed-off-by: Marton Balint --- ffplay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ffplay.c b/ffplay.c index afd8f9c111..47e4b84cb3 100644 --- a/ffplay.c +++ b/ffplay.c @@ -1566,10 +1566,9 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c is->video_st->time_base.num, is->video_st->time_base.den, codec->sample_aspect_ratio.num, codec->sample_aspect_ratio.den); - if ((ret = avfilter_graph_create_filter(&filt_src, avfilter_get_by_name("buffer"), - "src", buffersrc_args, NULL, + "ffplay_buffer", buffersrc_args, NULL, graph)) < 0) return ret; From db835708757462539ce6c5180ad1c07dbfdd5425 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 17 Jun 2012 20:56:30 +0200 Subject: [PATCH 3/3] ffplay: fix -vismv 1 Signed-off-by: Michael Niedermayer Signed-off-by: Marton Balint --- ffplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffplay.c b/ffplay.c index 47e4b84cb3..55c7825ee3 100644 --- a/ffplay.c +++ b/ffplay.c @@ -1699,7 +1699,7 @@ static int video_thread(void *arg) frame->pts = pts_int; frame->sample_aspect_ratio = av_guess_sample_aspect_ratio(is->ic, is->video_st, frame); - if (is->use_dr1) { + if (is->use_dr1 && frame->opaque) { FrameBuffer *buf = frame->opaque; AVFilterBufferRef *fb = avfilter_get_video_buffer_ref_from_arrays( frame->data, frame->linesize,