[FFmpeg-cvslog] avformat/dvdvideodec: remove auto value for menu_lu option

Marth64 git at videolan.org
Sat Nov 16 22:48:50 EET 2024


ffmpeg | branch: master | Marth64 <marth64 at proxyid.net> | Mon Oct  7 18:05:00 2024 -0500| [60434b483c54aa683a3249a158c8610d5db2fe4a] | committer: Marth64

avformat/dvdvideodec: remove auto value for menu_lu option

The "auto" mode serves no functional purpose except for logging
a message and setting the value to 1. The documentation clearly
explains what the option is for.

Signed-off-by: Marth64 <marth64 at proxyid.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=60434b483c54aa683a3249a158c8610d5db2fe4a
---

 doc/demuxers.texi         | 2 +-
 libavformat/dvdvideodec.c | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index 95be82aefc..86a9158e59 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -380,7 +380,7 @@ Default is false.
 
 @item menu_lu @var{int}
 The menu language to demux. In DVD, menus are grouped by language.
-Default is 0, the first language unit.
+Default is 1, the first language unit.
 
 @item menu_vts @var{int}
 The VTS where the menu lives, or 0 if it is a VMG menu (root-level).
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index 1da1865061..9983d34ec9 100644
--- a/libavformat/dvdvideodec.c
+++ b/libavformat/dvdvideodec.c
@@ -1562,13 +1562,6 @@ static int dvdvideo_read_header(AVFormatContext *s)
             return AVERROR(EINVAL);
         }
 
-        if (!c->opt_menu_lu) {
-            av_log(s, AV_LOG_INFO, "Defaulting to menu language unit #1. "
-                                   "This is not always desirable, validation suggested.\n");
-
-            c->opt_menu_lu = 1;
-        }
-
         if ((ret = dvdvideo_ifo_open(s)) < 0                                         ||
             (c->opt_preindex && (ret = dvdvideo_chapters_setup_preindex(s)) < 0)     ||
             (ret = dvdvideo_menu_open(s, &c->play_state)) < 0                        ||
@@ -1782,7 +1775,7 @@ static const AVOption dvdvideo_options[] = {
     {"chapter_end",     "exit chapter (PTT) number (0=end)",                        OFFSET(opt_chapter_end),    AV_OPT_TYPE_INT,    { .i64=0 },     0,          99,        AV_OPT_FLAG_DECODING_PARAM },
     {"chapter_start",   "entry chapter (PTT) number",                               OFFSET(opt_chapter_start),  AV_OPT_TYPE_INT,    { .i64=1 },     1,          99,        AV_OPT_FLAG_DECODING_PARAM },
     {"menu",            "demux menu domain",                                        OFFSET(opt_menu),           AV_OPT_TYPE_BOOL,   { .i64=0 },     0,          1,         AV_OPT_FLAG_DECODING_PARAM },
-    {"menu_lu",         "menu language unit (0=auto)",                              OFFSET(opt_menu_lu),        AV_OPT_TYPE_INT,    { .i64=0 },     0,          99,        AV_OPT_FLAG_DECODING_PARAM },
+    {"menu_lu",         "menu language unit",                                       OFFSET(opt_menu_lu),        AV_OPT_TYPE_INT,    { .i64=1 },     1,          99,        AV_OPT_FLAG_DECODING_PARAM },
     {"menu_vts",        "menu VTS (0=VMG root menu)",                               OFFSET(opt_menu_vts),       AV_OPT_TYPE_INT,    { .i64=1 },     0,          99,        AV_OPT_FLAG_DECODING_PARAM },
     {"pg",              "entry PG number (when paired with PGC number)",            OFFSET(opt_pg),             AV_OPT_TYPE_INT,    { .i64=1 },     1,          255,       AV_OPT_FLAG_DECODING_PARAM },
     {"pgc",             "entry PGC number (0=auto)",                                OFFSET(opt_pgc),            AV_OPT_TYPE_INT,    { .i64=0 },     0,          999,       AV_OPT_FLAG_DECODING_PARAM },



More information about the ffmpeg-cvslog mailing list