[FFmpeg-devel] [PATCH 2/2] ffplay: Use input picture parameters in input_request_frame().

Michael Niedermayer michaelni at gmx.at
Tue May 15 16:07:43 CEST 2012


Fixes Ticket122

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 ffplay.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 3c5ef68..e4fc987 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1680,10 +1680,10 @@ static int input_request_frame(AVFilterLink *link)
     if (priv->use_dr1 && priv->frame->opaque) {
         picref = avfilter_ref_buffer(priv->frame->opaque, ~0);
     } else {
-        picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h);
+        picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, priv->frame->width, priv->frame->height);
         av_image_copy(picref->data, picref->linesize,
                       (const uint8_t **)(void **)priv->frame->data, priv->frame->linesize,
-                      picref->format, link->w, link->h);
+                      picref->format, priv->frame->width, priv->frame->height);
     }
     av_free_packet(&pkt);
 
@@ -1691,7 +1691,7 @@ static int input_request_frame(AVFilterLink *link)
     picref->pts = pts;
 
     avfilter_start_frame(link, picref);
-    avfilter_draw_slice(link, 0, link->h, 1);
+    avfilter_draw_slice(link, 0, picref->video->h, 1);
     avfilter_end_frame(link);
 
     return 0;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list