[vlc-devel] commit: Respect jpeg format setting as scene snapshot and respect size setting when both width and height are set . (Jean-Paul Saman )

git version control git at videolan.org
Wed Sep 24 12:29:43 CEST 2008


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Wed Sep 24 11:41:48 2008 +0200| [b10da5f6c014de114445f02fc6e55042e54221e8] | committer: Jean-Paul Saman 

Respect jpeg format setting as scene snapshot and respect size setting when both width and height are set.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b10da5f6c014de114445f02fc6e55042e54221e8
---

 modules/video_filter/scene.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/video_filter/scene.c b/modules/video_filter/scene.c
index 67412dd..104dac9 100644
--- a/modules/video_filter/scene.c
+++ b/modules/video_filter/scene.c
@@ -275,7 +275,10 @@ static void SavePicture( filter_t *p_filter, picture_t *p_pic )
     fmt_out.i_sar_num = fmt_out.i_sar_den = 1;
     fmt_out.i_width = p_sys->i_width;
     fmt_out.i_height = p_sys->i_height;
-    fmt_out.i_chroma = VLC_FOURCC('p','n','g',' ');
+    if( !strncmp( p_sys->psz_format, "png", 3 ) )
+        fmt_out.i_chroma = VLC_FOURCC('p','n','g',' ');
+    else
+        fmt_out.i_chroma = VLC_FOURCC('j','p','e','g');
 
     if( (fmt_out.i_width == 0) && (fmt_out.i_height > 0) )
     {
@@ -285,7 +288,7 @@ static void SavePicture( filter_t *p_filter, picture_t *p_pic )
     {
         fmt_out.i_height = (fmt_in.i_height * fmt_out.i_width) / fmt_in.i_width;
     }
-    else
+    else if( (fmt_out.i_width == 0) && (fmt_out.i_height == 0) )
     {
         fmt_out.i_width = fmt_in.i_width;
         fmt_out.i_height = fmt_in.i_height;




More information about the vlc-devel mailing list