[vlc-commits] rawdv: don't recheck for extension

Rémi Denis-Courmont git at videolan.org
Fri Sep 25 18:05:54 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Sep 25 17:09:08 2020 +0300| [f982c2e2e4a762c42101d1c4456a83940b0d95da] | committer: Rémi Denis-Courmont

rawdv: don't recheck for extension

If the file as the .dv extension, the core will already force the rawdv
demux. In other words, the .dv extension implies the force flag.

So we only need to check the force flag.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f982c2e2e4a762c42101d1c4456a83940b0d95da
---

 modules/demux/rawdv.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/demux/rawdv.c b/modules/demux/rawdv.c
index 84a45cc446..2fbd661563 100644
--- a/modules/demux/rawdv.c
+++ b/modules/demux/rawdv.c
@@ -53,6 +53,10 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_INPUT_DEMUX )
     add_bool( "rawdv-hurry-up", false, HURRYUP_TEXT, HURRYUP_LONGTEXT, false )
     set_callbacks( Open, Close )
+    /* It isn't easy to recognize a raw DV stream. The chances that we'll
+     * mistake a stream from another type for a raw DV stream are too high, so
+     * we'll rely on the file extension to trigger this demux. Alternatively,
+     * it is possible to force this demux. */
     add_shortcut( "rawdv" )
     add_file_extension("dv")
 vlc_module_end ()
@@ -132,13 +136,7 @@ static int Open( vlc_object_t * p_this )
     dv_header_t dv_header;
     dv_id_t     dv_id;
 
-    /* It isn't easy to recognize a raw DV stream. The chances that we'll
-     * mistake a stream from another type for a raw DV stream are too high, so
-     * we'll rely on the file extension to trigger this demux. Alternatively,
-     * it is possible to force this demux. */
-
-    /* Check for DV file extension */
-    if( !demux_IsPathExtension( p_demux, ".dv" ) && !p_demux->obj.force )
+    if( !p_demux->obj.force )
         return VLC_EGENERIC;
 
     if( vlc_stream_Peek( p_demux->s, &p_peek, DV_PAL_FRAME_SIZE ) <



More information about the vlc-commits mailing list