[Ffmpeg-devel] [PATCH] Auto-resize ffplay video output

Diego Biurrun diego
Sat Dec 23 01:36:52 CET 2006


On Thu, Dec 21, 2006 at 04:52:09PM -0600, Steven Sheehy wrote:
> This patch resizes the ffplay window frame to match the dimensions of the 
> video being outputted. Previously the frame would be fixed at 640x480 
> regardless of the video's resolution unless the user requested a different 
> size with the -x and -y arguments. In my opinion, this is not desired 
> behavior since it is much more difficult to attempt to resize a video to 
> match its native resolution than it is to resize it to some random 
> resolution.

> --- ffplay.c	(revision 7350)
> +++ ffplay.c	(working copy)
> @@ -1133,6 +1134,18 @@
>  
> +            cur_stream->width = vp->width;
> +            cur_stream->height = vp->height;
> +        }
> +        screen_width = vp->width;
> +        screen_height = vp->height;

Nit: The "=" could be aligned to make the code look slightly prettier.

The patch works nice in my tests.  I'm all for applying it.

Diego




More information about the ffmpeg-devel mailing list