[vlc-devel] commit: Check for broken PCR value in es_out. (Laurent Aimar )

git version control git at videolan.org
Thu Apr 30 22:19:23 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Apr 30 22:09:34 2009 +0200| [fe54ba9c94201d462a12137f99b66fbf36d6b056] | committer: Laurent Aimar 

Check for broken PCR value in es_out.

It will prevent #2706 from broken demuxer/streams.

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

 src/input/es_out.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index e0708d0..22d4026 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2227,6 +2227,12 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
                 return VLC_EGENERIC;
 
             i_pcr = (int64_t)va_arg( args, int64_t );
+            if( i_pcr <= VLC_TS_INVALID )
+            {
+                msg_Err( p_sys->p_input, "Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !" );
+                return VLC_EGENERIC;
+            }
+
             /* search program
              * TODO do not use mdate() but proper stream acquisition date */
             input_clock_Update( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input),




More information about the vlc-devel mailing list