[vlc-commits] [Git][videolan/vlc][master] 9 commits: dmo: fix variable shadowing

Jean-Baptiste Kempf gitlab at videolan.org
Sun Jun 27 20:52:44 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
cc876c5e by Steve Lhomme at 2021-06-27T20:24:34+00:00
dmo: fix variable shadowing

Also remove the last p_vid write as it's not used anymore.

- - - - -
89f2dd43 by Steve Lhomme at 2021-06-27T20:24:34+00:00
access: decklink: fix variable shadowing

A temp string holder already exists.

- - - - -
ffa1adfc by Steve Lhomme at 2021-06-27T20:24:34+00:00
access: dshow: fix variable shadowing

A generic HRESULT already exists.

- - - - -
4e56e5cb by Steve Lhomme at 2021-06-27T20:24:34+00:00
aout: wasapi: fix variable shadowing

freq is also a global variable.

- - - - -
09eb27a8 by Steve Lhomme at 2021-06-27T20:24:34+00:00
demux: mkv: fix variable shadowing

- - - - -
eec485a0 by Steve Lhomme at 2021-06-27T20:24:34+00:00
direct3d9: fix variable shadowing

There's already a generic HRESULT.

- - - - -
34ca2a28 by Steve Lhomme at 2021-06-27T20:24:34+00:00
taglib: fix variable shadowing

list is already a different local list defined earlier in the function.

- - - - -
1b62cea5 by Steve Lhomme at 2021-06-27T20:24:34+00:00
sout: sdi: don't pass the logger object to parseConfiguration()

The object is already passed to the SDIAudioMultiplex constructor and kept.

Fixes a variable shadowing of the obj variable.

- - - - -
2497347f by Steve Lhomme at 2021-06-27T20:24:34+00:00
skins2: fix variable shadowing

No need to redefined local variables with the same name as parameters.

- - - - -


17 changed files:

- modules/access/decklink.cpp
- modules/access/dshow/dshow.cpp
- modules/audio_output/wasapi.c
- modules/codec/dmo/dmo.c
- modules/demux/mkv/matroska_segment.cpp
- modules/demux/mkv/matroska_segment_seeker.cpp
- modules/demux/mkv/mkv.cpp
- modules/demux/mkv/string_dispatcher.hpp
- modules/demux/mkv/virtual_segment.cpp
- modules/gui/skins2/controls/ctrl_image.cpp
- modules/gui/skins2/controls/ctrl_slider.cpp
- modules/gui/skins2/src/ft2_font.cpp
- modules/meta_engine/taglib.cpp
- modules/stream_out/sdi/SDIAudioMultiplex.cpp
- modules/stream_out/sdi/SDIAudioMultiplex.hpp
- modules/stream_out/sdi/SDIOutput.cpp
- modules/video_output/win32/direct3d9.c


Changes:

=====================================
modules/access/decklink.cpp
=====================================
@@ -657,7 +657,6 @@ static int Open(vlc_object_t *p_this)
         uint32_t field_flags;
         const char *field = GetFieldDominance(m->GetFieldDominance(), &field_flags);
         BMDDisplayMode id = ntohl(m->GetDisplayMode());
-        decklink_str_t tmp_name;
 
         if (m->GetName(&tmp_name) != S_OK) {
             mode_name = "unknown";


=====================================
modules/access/dshow/dshow.cpp
=====================================
@@ -2132,7 +2132,7 @@ static void ShowDeviceProperties( vlc_object_t *p_this,
          * TV Audio filter
          */
         ComPtr<IAMTVAudio> p_TVA;
-        HRESULT hr = p_graph->FindInterface( &PIN_CATEGORY_CAPTURE,
+        hr = p_graph->FindInterface( &PIN_CATEGORY_CAPTURE,
                                              &MEDIATYPE_Audio, p_device_filter,
                                              IID_IAMTVAudio, (void **)p_TVA.GetAddressOf() );
         if( SUCCEEDED(hr) )


=====================================
modules/audio_output/wasapi.c
=====================================
@@ -120,7 +120,7 @@ static HRESULT TimeGet(aout_stream_t *s, vlc_tick_t *restrict delay)
 {
     aout_stream_sys_t *sys = s->sys;
     void *pv;
-    UINT64 pos, qpcpos, freq;
+    UINT64 pos, qpcpos, clock_freq;
     HRESULT hr;
 
     if (atomic_load(&sys->started_state) != STARTED_STATE_OK)
@@ -137,7 +137,7 @@ static HRESULT TimeGet(aout_stream_t *s, vlc_tick_t *restrict delay)
 
     hr = IAudioClock_GetPosition(clock, &pos, &qpcpos);
     if (SUCCEEDED(hr))
-        hr = IAudioClock_GetFrequency(clock, &freq);
+        hr = IAudioClock_GetFrequency(clock, &clock_freq);
     IAudioClock_Release(clock);
     if (FAILED(hr))
     {
@@ -146,7 +146,7 @@ static HRESULT TimeGet(aout_stream_t *s, vlc_tick_t *restrict delay)
     }
 
     vlc_tick_t written = vlc_tick_from_frac(sys->written, sys->rate);
-    vlc_tick_t tick_pos = vlc_tick_from_frac(pos, freq);
+    vlc_tick_t tick_pos = vlc_tick_from_frac(pos, clock_freq);
 
     static_assert((10000000 % CLOCK_FREQ) == 0, "Frequency conversion broken");
 


=====================================
modules/codec/dmo/dmo.c
=====================================
@@ -1147,7 +1147,6 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
     while( 1 )
     {
         IWMCodecPrivateData *p_privdata;
-        VIDEOINFOHEADER *p_vih;
         uint8_t *p_data = 0;
         uint32_t i_data = 0, i_vih;
 
@@ -1192,7 +1191,6 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
 
     i_err = p_dmo->vt->SetOutputType( p_dmo, 0, &dmo_type, 0 );
 
-    p_vih = (VIDEOINFOHEADER *)dmo_type.pbFormat;
     p_enc->fmt_in.i_codec = VLC_CODEC_I420;
 
     DMOFreeMediaType( &dmo_type );


=====================================
modules/demux/mkv/matroska_segment.cpp
=====================================
@@ -116,17 +116,17 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
             eparser.Down();
             while( ( el = eparser.Get() ) != NULL )
             {
-                if ( MKV_CHECKED_PTR_DECL( kct_ptr, KaxCueTime, el ) )
+                if ( MKV_CHECKED_PTR_DECL( cuetime, KaxCueTime, el ) )
                 {
                     try
                     {
-                        if( unlikely( !kct_ptr->ValidateSize() ) )
+                        if( unlikely( !cuetime->ValidateSize() ) )
                         {
                             msg_Err( &sys.demuxer, "CueTime size too big");
                             b_invalid_cue = true;
                             break;
                         }
-                        kct_ptr->ReadData( es.I_O() );
+                        cuetime->ReadData( es.I_O() );
                     }
                     catch(...)
                     {
@@ -134,7 +134,7 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
                         b_invalid_cue = true;
                         break;
                     }
-                    cue_mk_time = VLC_TICK_FROM_NS(static_cast<uint64>( *kct_ptr ) * i_timescale);
+                    cue_mk_time = VLC_TICK_FROM_NS(static_cast<uint64>( *cuetime ) * i_timescale);
                 }
                 else if( MKV_IS_ID( el, KaxCueTrackPositions ) )
                 {
@@ -168,25 +168,25 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
                                 VLC_UNUSED( kcbn_ptr );
                             }
 #if LIBMATROSKA_VERSION >= 0x010401
-                            else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueRelativePosition, el ) )
+                            else if( MKV_CHECKED_PTR_DECL( cuerelative, KaxCueRelativePosition, el ) )
                             {
                                 // IGNORE
-                                ignored->ReadData( es.I_O() );
+                                cuerelative->ReadData( es.I_O() );
                             }
-                            else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueBlockNumber, el ) )
+                            else if( MKV_CHECKED_PTR_DECL( cueblock, KaxCueBlockNumber, el ) )
                             {
                                 // IGNORE
-                                ignored->ReadData( es.I_O() );
+                                cueblock->ReadData( es.I_O() );
                             }
-                            else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueReference, el ) )
+                            else if( MKV_CHECKED_PTR_DECL( cueref, KaxCueReference, el ) )
                             {
                                 // IGNORE
-                                ignored->ReadData( es.I_O(), SCOPE_ALL_DATA );
+                                cueref->ReadData( es.I_O(), SCOPE_ALL_DATA );
                             }
-                            else if( MKV_CHECKED_PTR_DECL( ignored, KaxCueDuration, el ) )
+                            else if( MKV_CHECKED_PTR_DECL( cueduration, KaxCueDuration, el ) )
                             {
                                 /* For future use */
-                                ignored->ReadData( es.I_O() );
+                                cueduration->ReadData( es.I_O() );
                             }
 #endif
                             else
@@ -337,10 +337,10 @@ done:
     return true;
 }
 
-void matroska_segment_c::LoadTags( KaxTags *tags )
+void matroska_segment_c::LoadTags( KaxTags *tags_ )
 {
     /* Master elements */
-    if( unlikely( tags->IsFiniteSize() && tags->GetSize() >= SIZE_MAX ) )
+    if( unlikely( tags_->IsFiniteSize() && tags_->GetSize() >= SIZE_MAX ) )
     {
         msg_Err( &sys.demuxer, "Tags too big, aborting" );
         return;
@@ -349,7 +349,7 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
     {
         EbmlElement *el;
         int i_upper_level = 0;
-        tags->Read( es, EBML_CONTEXT(tags), i_upper_level, el, true );
+        tags_->Read( es, EBML_CONTEXT(tags_), i_upper_level, el, true );
     }
     catch(...)
     {
@@ -452,7 +452,7 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
         }
     };
 
-    KaxTagsHandler::Dispatcher().iterate( tags->begin(), tags->end(), &payload );
+    KaxTagsHandler::Dispatcher().iterate( tags_->begin(), tags_->end(), &payload );
     msg_Dbg( &sys.demuxer, "loading tags done." );
 }
 
@@ -617,27 +617,27 @@ bool matroska_segment_c::Preload( )
             }
             i_tracks_position = el->GetElementPosition();
         }
-        else if( MKV_CHECKED_PTR_DECL ( kc_ptr, KaxCues, el ) )
+        else if( MKV_CHECKED_PTR_DECL ( cues, KaxCues, el ) )
         {
             msg_Dbg(  &sys.demuxer, "|   + Cues" );
             if( i_cues_position < 0 )
             {
-                LoadCues( kc_ptr );
+                LoadCues( cues );
                 i_cues_position = el->GetElementPosition();
             }
         }
-        else if( MKV_CHECKED_PTR_DECL ( kc_ptr, KaxCluster, el ) )
+        else if( MKV_CHECKED_PTR_DECL ( cluster_, KaxCluster, el ) )
         {
             if( sys.b_seekable &&
                 var_InheritBool( &sys.demuxer, "mkv-preload-clusters" ) )
             {
-                PreloadClusters        ( kc_ptr->GetElementPosition() );
-                es.I_O().setFilePointer( kc_ptr->GetElementPosition() );
+                PreloadClusters        ( cluster_->GetElementPosition() );
+                es.I_O().setFilePointer( cluster_->GetElementPosition() );
             }
             msg_Dbg( &sys.demuxer, "|   + Cluster" );
 
 
-            cluster = kc_ptr;
+            cluster = cluster_;
 
             // add first cluster as trusted seekpoint for all tracks
             for( tracks_map_t::const_iterator it = tracks.begin();
@@ -660,21 +660,21 @@ bool matroska_segment_c::Preload( )
                 i_attachments_position = el->GetElementPosition();
             }
         }
-        else if( MKV_CHECKED_PTR_DECL ( kc_ptr, KaxChapters, el ) )
+        else if( MKV_CHECKED_PTR_DECL ( chapters, KaxChapters, el ) )
         {
             msg_Dbg( &sys.demuxer, "|   + Chapters" );
             if( i_chapters_position < 0 )
             {
-                ParseChapters( kc_ptr );
+                ParseChapters( chapters );
                 i_chapters_position = el->GetElementPosition();
             }
         }
-        else if( MKV_CHECKED_PTR_DECL ( kt_ptr, KaxTags, el ) )
+        else if( MKV_CHECKED_PTR_DECL ( tags_, KaxTags, el ) )
         {
             msg_Dbg( &sys.demuxer, "|   + Tags" );
             if(tags.empty ())
             {
-                LoadTags( kt_ptr );
+                LoadTags( tags_ );
             }
         }
         else if( MKV_IS_ID ( el, EbmlVoid ) )
@@ -765,21 +765,21 @@ bool matroska_segment_c::LoadSeekHeadItem( const EbmlCallbacks & ClassInfos, int
             i_attachments_position = i_element_position;
         }
     }
-    else if( MKV_CHECKED_PTR_DECL ( kc_ptr, KaxChapters, el ) )
+    else if( MKV_CHECKED_PTR_DECL ( chapters, KaxChapters, el ) )
     {
         msg_Dbg( &sys.demuxer, "|   + Chapters" );
         if( i_chapters_position < 0 )
         {
-            ParseChapters( kc_ptr );
+            ParseChapters( chapters );
             i_chapters_position = i_element_position;
         }
     }
-    else if( MKV_CHECKED_PTR_DECL ( kt_ptr, KaxTags, el ) )
+    else if( MKV_CHECKED_PTR_DECL ( tags_, KaxTags, el ) )
     {
         msg_Dbg( &sys.demuxer, "|   + Tags" );
         if(tags.empty ())
         {
-            LoadTags( kt_ptr );
+            LoadTags( tags_ );
         }
     }
     else
@@ -1070,24 +1070,24 @@ void matroska_segment_c::EnsureDuration()
         {
             EbmlElement *l = (*p_last_cluster)[i];
 
-            if( MKV_CHECKED_PTR_DECL ( block, KaxSimpleBlock, l ) )
+            if( MKV_CHECKED_PTR_DECL ( simpleblock, KaxSimpleBlock, l ) )
             {
-                block->SetParent( *p_last_cluster );
-                i_last_timecode = std::max(i_last_timecode, block->GlobalTimecode());
+                simpleblock->SetParent( *p_last_cluster );
+                i_last_timecode = std::max(i_last_timecode, simpleblock->GlobalTimecode());
             }
             else if( MKV_CHECKED_PTR_DECL ( group, KaxBlockGroup, l ) )
             {
                 uint64 i_group_timecode = 0;
                 for( unsigned int j = 0; j < group->ListSize(); j++ )
                 {
-                    EbmlElement *l = (*group)[j];
+                    EbmlElement *g = (*group)[j];
 
-                    if( MKV_CHECKED_PTR_DECL ( block, KaxBlock, l ) )
+                    if( MKV_CHECKED_PTR_DECL ( block, KaxBlock, g ) )
                     {
                         block->SetParent( *p_last_cluster );
                         i_group_timecode += block->GlobalTimecode();
                     }
-                    else if( MKV_CHECKED_PTR_DECL ( kbd_ptr, KaxBlockDuration, l ) )
+                    else if( MKV_CHECKED_PTR_DECL ( kbd_ptr, KaxBlockDuration, g ) )
                     {
                         i_group_timecode += static_cast<uint64>( *kbd_ptr );
                     }


=====================================
modules/demux/mkv/matroska_segment_seeker.cpp
=====================================
@@ -514,9 +514,9 @@ SegmentSeeker::mkv_jump_to( matroska_segment_c& ms, fptr_t fpos )
             add_cluster(ms.cluster);
             break;
         }
-        else if( MKV_CHECKED_PTR_DECL( p_tc, EbmlCrc32, el ) )
+        else if( MKV_CHECKED_PTR_DECL( crc, EbmlCrc32, el ) )
         {
-            p_tc->ReadData( ms.es.I_O(), SCOPE_ALL_DATA ); /* avoid a skip that may fail */
+            crc->ReadData( ms.es.I_O(), SCOPE_ALL_DATA ); /* avoid a skip that may fail */
         }
     }
 


=====================================
modules/demux/mkv/mkv.cpp
=====================================
@@ -210,7 +210,6 @@ static int OpenInternal( demux_t *p_demux, bool trust_cues )
                             !strcasecmp(s_filename.c_str() + s_filename.length() - 4, ".mka"))
                         {
                             // test whether this file belongs to our family
-                            const uint8_t *p_peek;
                             bool          file_ok = false;
                             char          *psz_url = vlc_path2uri( s_filename.c_str(), "file" );
                             stream_t      *p_file_stream = vlc_stream_NewURL(
@@ -224,16 +223,16 @@ static int OpenInternal( demux_t *p_demux, bool trust_cues )
 
                             if ( file_ok )
                             {
-                                matroska_stream_c *p_stream = new matroska_stream_c( p_file_stream, true );
+                                matroska_stream_c *p_preload_stream = new matroska_stream_c( p_file_stream, true );
 
-                                if ( !p_sys->AnalyseAllSegmentsFound( p_demux, p_stream ) )
+                                if ( !p_sys->AnalyseAllSegmentsFound( p_demux, p_preload_stream ) )
                                 {
                                     msg_Dbg( p_demux, "the file '%s' will not be used", s_filename.c_str() );
-                                    delete p_stream;
+                                    delete p_preload_stream;
                                 }
                                 else
                                 {
-                                    p_sys->streams.push_back( p_stream );
+                                    p_sys->streams.push_back( p_preload_stream );
                                 }
                             }
                             else
@@ -382,7 +381,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             if( p_sys->titles.size() > 1 || ( p_sys->titles.size() == 1 && p_sys->titles[0]->i_seekpoint > 0 ) )
             {
                 input_title_t ***ppp_title = va_arg( args, input_title_t*** );
-                int *pi_int = va_arg( args, int* );
+                pi_int = va_arg( args, int* );
 
                 *pi_int = p_sys->titles.size();
                 *ppp_title = static_cast<input_title_t**>( vlc_alloc( p_sys->titles.size(), sizeof( input_title_t* ) ) );


=====================================
modules/demux/mkv/string_dispatcher.hpp
=====================================
@@ -57,7 +57,6 @@ namespace {
       void insert_glob (ProcessorEntry const& data) {
         std::istringstream iss (data.first);
         std::vector<std::string> parts;
-        std::string s1;
 
         for (std::string s1; std::getline (iss, s1, '*'); )
           parts.push_back (s1);


=====================================
modules/demux/mkv/virtual_segment.cpp
=====================================
@@ -274,9 +274,9 @@ virtual_segment_c::virtual_segment_c( matroska_segment_c & main_segment, std::ve
         virtual_edition_c * p_vedition = new virtual_edition_c( main_segment.stored_editions[i], main_segment, p_opened_segments );
 
         bool b_has_translate = false;
-        for (size_t i=0; i < p_vedition->vchapters.size(); i++)
+        for (size_t j=0; i < p_vedition->vchapters.size(); i++)
         {
-            if ( p_vedition->vchapters[i]->segment.translations.size() != 0 )
+            if ( p_vedition->vchapters[j]->segment.translations.size() != 0 )
             {
                 b_has_translate = true;
                 break;


=====================================
modules/gui/skins2/controls/ctrl_image.cpp
=====================================
@@ -208,7 +208,6 @@ void CtrlImage::draw( OSGraphics &rImage, int xDest, int yDest, int w, int h )
 
         // new image scaled with aspect ratio preserved
         // and centered inside the control boundaries
-        int w, h;
         if( scaled_height > height )
         {
             w = scaled_width;


=====================================
modules/gui/skins2/controls/ctrl_slider.cpp
=====================================
@@ -486,8 +486,8 @@ void CtrlSliderBg::notifyLayout( int width, int height,
         float factorX, factorY;
         getResizeFactors( factorX, factorY );
         // real background size
-        int width = m_bgWidth - (int)(m_padHoriz * factorX);
-        int height = m_bgHeight - (int)(m_padVert * factorY);
+        width = m_bgWidth - (int)(m_padHoriz * factorX);
+        height = m_bgHeight - (int)(m_padVert * factorY);
         CtrlGeneric::notifyLayout( width, height );
     }
 }


=====================================
modules/gui/skins2/src/ft2_font.cpp
=====================================
@@ -271,7 +271,7 @@ GenericBitmap *FT2Font::drawString( const UString &rString, uint32_t color,
     // Draw the trailing dots if the text is truncated
     if( maxIndex < len )
     {
-        int penX = firstDotX;
+        penX = firstDotX;
         FT_BitmapGlyphRec *pBmpGlyph = (FT_BitmapGlyphRec*)dotGlyph.m_glyph;
         for( n = 0; n < 3; n++ )
         {


=====================================
modules/meta_engine/taglib.cpp
=====================================
@@ -833,15 +833,15 @@ static void ReadMetaFromMP4( MP4::Tag* tag, demux_meta_t *p_demux_meta, vlc_meta
 
     if( tag->itemListMap().contains("covr") )
     {
-        MP4::CoverArtList list = tag->itemListMap()["covr"].toCoverArtList();
-        const char *psz_format = list[0].format() == MP4::CoverArt::PNG ? "image/png" : "image/jpeg";
+        MP4::CoverArtList cover_list = tag->itemListMap()["covr"].toCoverArtList();
+        const char *psz_format = cover_list[0].format() == MP4::CoverArt::PNG ? "image/png" : "image/jpeg";
 
         msg_Dbg( p_demux_meta, "Found embedded art (%s) is %i bytes",
-                 psz_format, list[0].data().size() );
+                 psz_format, cover_list[0].data().size() );
 
         input_attachment_t *p_attachment =
                 vlc_input_attachment_New( "cover", psz_format, "cover",
-                                          list[0].data().data(), list[0].data().size() );
+                                          cover_list[0].data().data(), cover_list[0].data().size() );
         if( p_attachment )
         {
             TAB_APPEND_CAST( (input_attachment_t**),


=====================================
modules/stream_out/sdi/SDIAudioMultiplex.cpp
=====================================
@@ -138,7 +138,7 @@ void SDIAudioMultiplexConfig::setSubFrameSlotUsed(uint8_t i)
     subframeslotbitmap |= (1 << i);
 }
 
-void SDIAudioMultiplexConfig::parseConfiguration(vlc_object_t *obj, const char *psz)
+void SDIAudioMultiplexConfig::parseConfiguration(const char *psz)
 {
     char *name = NULL;
     char *psz_in = (char*)psz;
@@ -367,7 +367,7 @@ const es_format_t *
 }
 
 SDIAudioMultiplex::SDIAudioMultiplex(vlc_object_t *obj, uint8_t channels)
-    : config(SDIAudioMultiplexConfig(obj, channels))
+    : config(obj, channels)
 {
     p_obj = obj;
     head = VLC_TICK_INVALID;


=====================================
modules/stream_out/sdi/SDIAudioMultiplex.hpp
=====================================
@@ -57,7 +57,7 @@ namespace sdi_sout
             bool decode(const StreamID &) const;
             bool SubFrameSlotUsed(uint8_t) const;
             void setSubFrameSlotUsed(uint8_t);
-            void parseConfiguration(vlc_object_t *, const char *);
+            void parseConfiguration(const char *);
             uint8_t getMultiplexedFramesCount() const { return framewidth; }
             std::vector<uint8_t> getFreeSubFrameSlots(bool = false) const;
             std::vector<uint8_t> getConfiguredSlots(const StreamID &) const;


=====================================
modules/stream_out/sdi/SDIOutput.cpp
=====================================
@@ -59,7 +59,7 @@ SDIOutput::SDIOutput(sout_stream_t *p_stream_)
     char *psz_channelsconf = var_InheritString(p_stream, CFG_PREFIX "audio");
     if(psz_channelsconf)
     {
-        audioMultiplex->config.parseConfiguration(VLC_OBJECT(p_stream), psz_channelsconf);
+        audioMultiplex->config.parseConfiguration(psz_channelsconf);
         free(psz_channelsconf);
     }
 }


=====================================
modules/video_output/win32/direct3d9.c
=====================================
@@ -1201,7 +1201,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
     {
         D3DLOCKED_RECT d3drect;
         surface = sys->dx_render;
-        HRESULT hr = IDirect3DSurface9_LockRect(surface, &d3drect, NULL, 0);
+        hr = IDirect3DSurface9_LockRect(surface, &d3drect, NULL, 0);
         if (unlikely(FAILED(hr))) {
             msg_Err(vd, "failed to lock surface");
             return;
@@ -1225,7 +1225,6 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
                 surface = picsys->surface;
             else
             {
-                HRESULT hr;
                 RECT visibleSource;
                 visibleSource.left = 0;
                 visibleSource.top = 0;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2daf3cbf719d490bbb05d14a9d6cbacfd3126064...2497347f29c9338124f79cad98ac52cabbc19545

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2daf3cbf719d490bbb05d14a9d6cbacfd3126064...2497347f29c9338124f79cad98ac52cabbc19545
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list