[vlc-devel] [PATCH] avcodec: be more explicit of what the frame skip values are

Steve Lhomme robux4 at videolabs.io
Mon Sep 18 09:14:45 CEST 2017


---
replaces https://patches.videolan.org/patch/18161/
- use pre existing translation strings found below
---
 modules/codec/avcodec/avcodec.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index f286a3adaf..14c5258f79 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -45,6 +45,10 @@
 /****************************************************************************
  * Local prototypes
  ****************************************************************************/
+static const int  frame_skip_list[] = { -1, 0, 1, 2, 3, 4 };
+static const char *const frame_skip_list_text[] =
+  { N_("None"), N_("Default"), N_("Non-ref"), N_("Bidir"), N_("Non-key"), N_("All") };
+
 static const int  nloopf_list[] = { 0, 1, 2, 3, 4 };
 static const char *const nloopf_list_text[] =
   { N_("None"), N_("Non-ref"), N_("Bidir"), N_("Non-key"), N_("All") };
@@ -106,7 +110,7 @@ vlc_module_begin ()
     add_obsolete_integer( "ffmpeg-skip-frame") /* removed since 2.1.0 */
     add_integer( "avcodec-skip-frame", 0, SKIP_FRAME_TEXT,
         SKIP_FRAME_LONGTEXT, true )
-        change_integer_range( -1, 4 )
+        change_integer_list( frame_skip_list, frame_skip_list_text )
     add_obsolete_integer( "ffmpeg-skip-idct" ) /* removed since 2.1.0 */
     add_integer( "avcodec-skip-idct", 0, SKIP_IDCT_TEXT,
         SKIP_IDCT_LONGTEXT, true )
-- 
2.12.1



More information about the vlc-devel mailing list