[MPlayer-cvslog] r36737 - in trunk: command.c libmpdemux/demux_lmlm4.c libmpdemux/demux_mkv.c libmpdemux/muxer_mpeg.c libvo/vo_fbdev2.c libvo/vo_xvidix.c libvo/x11_common.c vidix/s3_vid.c vidix/sis_vid.c vidix/unic...

reimar subversion at mplayerhq.hu
Sat Jan 25 17:55:10 CET 2014


Author: reimar
Date: Sat Jan 25 17:55:09 2014
New Revision: 36737

Log:
Document switch case fallthroughs.

Modified:
   trunk/command.c
   trunk/libmpdemux/demux_lmlm4.c
   trunk/libmpdemux/demux_mkv.c
   trunk/libmpdemux/muxer_mpeg.c
   trunk/libvo/vo_fbdev2.c
   trunk/libvo/vo_xvidix.c
   trunk/libvo/x11_common.c
   trunk/vidix/s3_vid.c
   trunk/vidix/sis_vid.c
   trunk/vidix/unichrome_vid.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/command.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -1067,6 +1067,7 @@ static int mp_property_fullscreen(m_opti
         M_PROPERTY_CLAMP(prop, *(int *) arg);
         if (vo_fs == !!*(int *) arg)
             return M_PROPERTY_OK;
+        /* Fallthrough to toggle */
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
 #ifdef CONFIG_GUI
@@ -1211,6 +1212,7 @@ static int mp_property_vo_flag(m_option_
         M_PROPERTY_CLAMP(prop, *(int *) arg);
         if (*vo_var == !!*(int *) arg)
             return M_PROPERTY_OK;
+        /* Fallthrough to toggle */
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
         if (vo_config_count)
@@ -3442,6 +3444,7 @@ int run_command(MPContext *mpctx, mp_cmd
             af_uninit(mpctx->mixer.afilter);
             af_init(mpctx->mixer.afilter);
         }
+        /* Fallthrough to add filters like for af_add */
     case MP_CMD_AF_ADD:
     case MP_CMD_AF_DEL:
         if (!sh_audio)

Modified: trunk/libmpdemux/demux_lmlm4.c
==============================================================================
--- trunk/libmpdemux/demux_lmlm4.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/libmpdemux/demux_lmlm4.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -264,6 +264,7 @@ static int demux_lmlm4_fill_buffer(demux
             video = 1;
             mp_dbg(MSGT_DEMUX, MSGL_DBG2, "First Video Packet\n");
         }
+        /* Fallthrough to common handling */
     case FRAMETYPE_P:
 	frames=(frames+1)&(1024*1024-1); // wrap around at 4 hrs to avoid inaccurate float calculations
         if (!video)

Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/libmpdemux/demux_mkv.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -2095,6 +2095,7 @@ static int demux_mkv_open(demuxer_t *dem
 
         default:
             cont = 1;
+            /* Fallthrough to skip data */
         case EBML_ID_VOID:
             ebml_read_skip(s, NULL);
             break;

Modified: trunk/libmpdemux/muxer_mpeg.c
==============================================================================
--- trunk/libmpdemux/muxer_mpeg.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/libmpdemux/muxer_mpeg.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -2077,6 +2077,7 @@ static int parse_audio(muxer_stream_t *s
 		{
 		default:
 			mp_msg(MSGT_MUXER, MSGL_ERR, "Unknown audio format, assuming MP2/3, use -fafmttag!\n");
+			/* Fallthrough to treat like MP2/3 */
 		case AUDIO_MP2:
 		case AUDIO_MP3:
 			{

Modified: trunk/libvo/vo_fbdev2.c
==============================================================================
--- trunk/libvo/vo_fbdev2.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/libvo/vo_fbdev2.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -59,6 +59,7 @@ static void set_bpp(struct fb_var_screen
 		case 32:
 			p->transp.offset = 24;
 			p->transp.length = 8;
+			/* Fallthrough, rest matches 24 bit */
 		case 24:
 			p->red.offset = 16;
 			p->red.length = 8;

Modified: trunk/libvo/vo_xvidix.c
==============================================================================
--- trunk/libvo/vo_xvidix.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/libvo/vo_xvidix.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -396,6 +396,7 @@ static int control(uint32_t request, voi
             return VO_TRUE;
         case VOCTRL_FULLSCREEN:
             vo_x11_fullscreen();
+            /* Fallthrough to reconfigure panscan */
         case VOCTRL_SET_PANSCAN:
             if (vo_fs && (vo_panscan != vo_panscan_amount))
             {

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/libvo/x11_common.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -894,6 +894,7 @@ static int handle_x11_event(Display *myd
                 return VO_EVENT_MOUSE;
             case ButtonPress:
                 key = MP_KEY_DOWN;
+                /* Fallthrough, treat like release otherwise */
             case ButtonRelease:
 #ifdef CONFIG_GUI
                 // Ignore mouse button 1-3 under GUI.

Modified: trunk/vidix/s3_vid.c
==============================================================================
--- trunk/vidix/s3_vid.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/vidix/s3_vid.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -667,6 +667,7 @@ static int s3_init (void)
     if ((VGAIN8 (vgaCRReg) & 0xC0) == (0x01 << 6))
       RamSavage4[1] = 8;
 
+    /* Otherwise the same, so fallthrough */
   case S3_SAVAGE2000:
     videoRam = RamSavage4[(cr36 & 0xE0) >> 5] * 1024;
     break;

Modified: trunk/vidix/sis_vid.c
==============================================================================
--- trunk/vidix/sis_vid.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/vidix/sis_vid.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -276,12 +276,14 @@ static int sis_probe(int verbose, int fo
 		case DEVICE_SIS_300:
 		case DEVICE_SIS_630_VGA:
 		    sis_has_two_overlays = 1;
+                    /* Fallthrough, same as next otherwise */
 		case DEVICE_SIS_540_VGA:
 		    sis_vga_engine = SIS_300_VGA;
 		    break;
 		case DEVICE_SIS_330:
 		case DEVICE_SIS_550_VGA:
 		    sis_has_two_overlays = 1;
+                    /* Fallthrough, same as next otherwise */
 		case DEVICE_SIS_315H:
 		case DEVICE_SIS_315:
 		case DEVICE_SIS_315PRO:

Modified: trunk/vidix/unichrome_vid.c
==============================================================================
--- trunk/vidix/unichrome_vid.c	Sat Jan 25 17:55:08 2014	(r36736)
+++ trunk/vidix/unichrome_vid.c	Sat Jan 25 17:55:09 2014	(r36737)
@@ -787,6 +787,7 @@ unichrome_config_playback (vidix_playbac
     {
     case IMGFMT_YV12:
       swap_uv = 1;
+      /* Fallthrough, same as the following otherwise */
     case IMGFMT_I420:
     case IMGFMT_UYVY:
     case IMGFMT_YVYU:


More information about the MPlayer-cvslog mailing list