[vlc-commits] Dshow: fix freeze
Jean-Baptiste Kempf
git at videolan.org
Wed Oct 21 18:19:38 CEST 2015
vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jul 15 08:51:05 2015 +0200| [0f13e8d16b5b7be99776b72ede9b189596b72af8] | committer: Jean-Baptiste Kempf
Dshow: fix freeze
Close #14278
(cherry picked from commit a81cc9be43b5f2a6b3ecdb3b2850f28fd22a9a5e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=0f13e8d16b5b7be99776b72ede9b189596b72af8
---
modules/access/dshow/dshow.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 0e21fe4..684e2c2 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1885,7 +1885,7 @@ static int Demux( demux_t *p_demux )
REFERENCE_TIME i_pts, i_end_date;
HRESULT hr = sample.p_sample->GetTime( &i_pts, &i_end_date );
- if( hr == S_OK || hr == VFW_S_NO_STOP_TIME )
+ if( hr != S_OK && hr != VFW_S_NO_STOP_TIME )
{
if( p_stream->mt.majortype == MEDIATYPE_Video || !p_stream->b_pts )
{
@@ -1893,12 +1893,15 @@ static int Demux( demux_t *p_demux )
i_pts = sample.i_timestamp;
p_stream->b_pts = true;
}
+ else
+ i_pts = VLC_TS_INVALID;
+ }
+
+ if( i_pts > VLC_TS_INVALID ) {
i_pts += (i_pts >= 0) ? +5 : -4;
i_pts /= 10; /* 100-ns to µs conversion */
i_pts += VLC_TS_0;
}
- else
- i_pts = VLC_TS_INVALID;
#if 0
msg_Dbg( p_demux, "Read() stream: %i, size: %i, PTS: %"PRId64,
i_stream, i_data_size, i_pts );
More information about the vlc-commits
mailing list