[vlc-commits] demux: ts: remove ts bitrate check (fix #12776)

Francois Cartegnie git at videolan.org
Wed Feb 4 20:03:35 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb  4 19:57:30 2015 +0100| [c982218c0dbde2a0cca75d3c6b42635370ce0257] | committer: Francois Cartegnie

demux: ts: remove ts bitrate check (fix #12776)

Pointless as it does not work with high compression codecs
and can't handle multiple streams or single audio.

Partially reverts cb5f74d6b3c9bbf35493ebc5d0b561bfaba9d7f1

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

 modules/demux/ts.c |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 000ef67..e16f342 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -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;



More information about the vlc-commits mailing list