]> git.sesse.net Git - vlc/commitdiff
demux: ts: remove ts bitrate check (fix #12776)
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 4 Feb 2015 18:57:30 +0000 (19:57 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 4 Feb 2015 19:00:03 +0000 (20:00 +0100)
Pointless as it does not work with high compression codecs
and can't handle multiple streams or single audio.

Partially reverts cb5f74d6b3c9bbf35493ebc5d0b561bfaba9d7f1

modules/demux/ts.c

index 000ef67d2b2ad7f9ae7120b80e0454ca77743870..e16f3427bba4d1b79ba9306fe3041d06ed1cb14d 100644 (file)
@@ -2679,20 +2679,7 @@ static void GetLastPCR( demux_t *p_demux )
         if( ( i_pos = stream_Tell( p_sys->stream ) ) >= i_last_pos )
             break;
     }
-    if( p_sys->i_last_pcr >= 0 )
-    {
-        int64_t i_size = stream_Size( p_sys->stream );
-        mtime_t i_duration_msec = ( p_sys->i_last_pcr - p_sys->i_first_pcr ) * 100 / 9 / 1000;
-        int64_t i_rate = ( i_size < 0 || i_duration_msec <= 0 ) ? 0 : i_size * 1000 * 8 / i_duration_msec;
-        const int64_t TS_SUPPOSED_MAXRATE = 55 * 1000 * 1000; //FIXME I think it's enough.
-        const int64_t TS_SUPPOSED_MINRATE = 0.5 * 1000 * 1000; //FIXME
-        if( i_rate < TS_SUPPOSED_MINRATE || i_rate > TS_SUPPOSED_MAXRATE )
-        {
-            msg_Dbg( p_demux, "calculated bitrate (%"PRId64"bit/s) is too low or too high. min bitrate (%"PRId64"bit/s) max bitrate (%"PRId64"bit/s)",
-                     i_rate, TS_SUPPOSED_MINRATE, TS_SUPPOSED_MAXRATE );
-            p_sys->i_last_pcr = -1;
-        }
-    }
+
     stream_Seek( p_sys->stream, i_initial_pos );
     assert( i_initial_pos == stream_Tell( p_sys->stream ) );
     p_sys->i_current_pcr = i_initial_pcr;