[vlc-commits] decoder: fix potential NULL dereference
Rémi Denis-Courmont
git at videolan.org
Wed Apr 2 18:31:35 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 2 19:30:57 2014 +0300| [8c6482b3e183b3f80135b9400cd75c3725e98704] | committer: Rémi Denis-Courmont
decoder: fix potential NULL dereference
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c6482b3e183b3f80135b9400cd75c3725e98704
---
src/input/decoder.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 714bddb..1232a76 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1065,8 +1065,11 @@ static void DecoderFixTs( decoder_t *p_dec, mtime_t *pi_ts0, mtime_t *pi_ts1,
if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
*pi_ts1 += i_es_delay;
if( input_clock_ConvertTS( p_clock, &i_rate, pi_ts0, pi_ts1, i_ts_bound ) ) {
- msg_Err(p_dec, "Could not convert timestamps %"PRId64", %"PRId64"",
- *pi_ts0, *pi_ts1);
+ if( pi_ts1 != NULL )
+ msg_Err(p_dec, "Could not convert timestamps %"PRId64
+ ", %"PRId64"", *pi_ts0, *pi_ts1);
+ else
+ msg_Err(p_dec, "Could not convert timestamp %"PRId64, *pi_ts0);
*pi_ts0 = VLC_TS_INVALID;
}
}
More information about the vlc-commits
mailing list