Encoder::Stream::set_metadata() broken - ID: 3282704
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 4 Feb 2012 06:34:43 +0000 (17:34 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 5 Feb 2012 05:51:32 +0000 (16:51 +1100)
http://sourceforge.net/tracker/?func=detail&aid=3282704&group_id=13478&atid=313478

src/libFLAC++/stream_encoder.cpp

index 9b66459..4eb2059 100644 (file)
@@ -203,7 +203,7 @@ namespace FLAC {
 #endif
                        for(unsigned i = 0; i < num_blocks; i++) {
                                // we can get away with the const_cast since we know the encoder will only correct the is_last flags
-                               m[i] = const_cast< ::FLAC__StreamMetadata*>((const ::FLAC__StreamMetadata*)metadata[i]);
+                               m[i] = const_cast< ::FLAC__StreamMetadata*>(static_cast<const ::FLAC__StreamMetadata*>(*metadata[i]));
                        }
 #ifndef HAVE_CXX_VARARRAYS
                        // complete the hack