[FFmpeg-soc] [soc]: r5668 - in libavfilter: vf_rotate.c vf_transpose.c

koorogi subversion at mplayerhq.hu
Mon Mar 15 02:33:51 CET 2010


Author: koorogi
Date: Mon Mar 15 02:33:50 2010
New Revision: 5668

Log:
Don't output undefined aspect ratio.
Fixes transpose and rotate filters in ffplay.

Modified:
   libavfilter/vf_rotate.c
   libavfilter/vf_transpose.c

Modified: libavfilter/vf_rotate.c
==============================================================================
--- libavfilter/vf_rotate.c	Mon Mar 15 02:33:47 2010	(r5667)
+++ libavfilter/vf_rotate.c	Mon Mar 15 02:33:50 2010	(r5668)
@@ -171,8 +171,12 @@ static void start_frame(AVFilterLink *li
     out->outpic->pts = picref->pts;
     out->outpic->pos = picref->pos;
 
+    if(picref->pixel_aspect.num == 0) {
+        out->outpic->pixel_aspect = picref->pixel_aspect;
+    } else {
     out->outpic->pixel_aspect.num = picref->pixel_aspect.den;
     out->outpic->pixel_aspect.den = picref->pixel_aspect.num;
+    }
 
     avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
 }

Modified: libavfilter/vf_transpose.c
==============================================================================
--- libavfilter/vf_transpose.c	Mon Mar 15 02:33:47 2010	(r5667)
+++ libavfilter/vf_transpose.c	Mon Mar 15 02:33:50 2010	(r5668)
@@ -101,8 +101,12 @@ static void start_frame(AVFilterLink *li
     out->outpic      = avfilter_get_video_buffer(out, AV_PERM_WRITE, out->w, out->h);
     out->outpic->pts = picref->pts;
 
+    if(picref->pixel_aspect.num == 0) {
+        out->outpic->pixel_aspect = picref->pixel_aspect;
+    } else {
     out->outpic->pixel_aspect.num = picref->pixel_aspect.den;
     out->outpic->pixel_aspect.den = picref->pixel_aspect.num;
+    }
 
     avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0));
 }


More information about the FFmpeg-soc mailing list