[PATCH] In ffplay adopt compact notation in code which sets aspect ration from the DTG active format.

Stefano Sabatini stefano.sabatini-lala
Sat Feb 12 18:25:53 CET 2011


This is legacy code, since it's not clear why it was left behind I'm
leaving the logic untouched. Improve readability.
---
 ffplay.c |   28 +++++++---------------------
 1 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 170acfd..be26150 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -723,27 +723,13 @@ static void video_image_display(VideoState *is)
 #if 0
         switch(is->video_st->codec->dtg_active_format) {
         case FF_DTG_AFD_SAME:
-        default:
-            /* nothing to do */
-            break;
-        case FF_DTG_AFD_4_3:
-            aspect_ratio = 4.0 / 3.0;
-            break;
-        case FF_DTG_AFD_16_9:
-            aspect_ratio = 16.0 / 9.0;
-            break;
-        case FF_DTG_AFD_14_9:
-            aspect_ratio = 14.0 / 9.0;
-            break;
-        case FF_DTG_AFD_4_3_SP_14_9:
-            aspect_ratio = 14.0 / 9.0;
-            break;
-        case FF_DTG_AFD_16_9_SP_14_9:
-            aspect_ratio = 14.0 / 9.0;
-            break;
-        case FF_DTG_AFD_SP_4_3:
-            aspect_ratio = 4.0 / 3.0;
-            break;
+        default:                      /* nothing to do */        break;
+        case FF_DTG_AFD_4_3:          aspect_ratio =  4.0 / 3.0; break;
+        case FF_DTG_AFD_16_9:         aspect_ratio = 16.0 / 9.0; break;
+        case FF_DTG_AFD_14_9:         aspect_ratio = 14.0 / 9.0; break;
+        case FF_DTG_AFD_4_3_SP_14_9:  aspect_ratio = 14.0 / 9.0; break;
+        case FF_DTG_AFD_16_9_SP_14_9: aspect_ratio = 14.0 / 9.0; break;
+        case FF_DTG_AFD_SP_4_3:       aspect_ratio =  4.0 / 3.0; break;
         }
 #endif
 
-- 
1.7.2.3


--/04w6evG8XlLl3ft--



More information about the ffmpeg-devel mailing list