[vlc-commits] demux: mp4: rtp setup: missing checks and simplify tssy
Francois Cartegnie
git at videolan.org
Sat May 21 17:05:35 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat May 21 15:23:13 2016 +0200| [97c42037e60d9acd71e342bc29d4ec1be45e8e4c] | committer: Francois Cartegnie
demux: mp4: rtp setup: missing checks and simplify tssy
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=97c42037e60d9acd71e342bc29d4ec1be45e8e4c
---
modules/demux/mp4/essetup.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 4e2592e..724abbf 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -282,13 +282,12 @@ static int SetupRTPReceptionHintTrack( demux_t *p_demux, mp4_track_t *p_track, M
return 0;
}
- MP4_Box_t *p_tssy_box = MP4_BoxGet(p_sample, "tssy", 0);
- if( p_tssy_box != NULL )
+ const MP4_Box_t *p_tssy = MP4_BoxGet(p_sample, "tssy");
+ if( p_tssy && BOXDATA(p_tssy) )
{
- MP4_Box_data_tssy_t *p_tssy = p_tssy_box->data.p_tssy;
/* take the 2 last bits which indicate the synchronization mode */
- uint8_t temp = p_tssy->i_reserved_timestamp_sync & 0x03;
- p_track->sync_mode = (RTP_timstamp_synchronization_t)temp;
+ p_track->sync_mode = (RTP_timstamp_synchronization_t)
+ BOXDATA(p_tssy)->i_reserved_timestamp_sync & 0x03;
}
MP4_Box_t *p_tsro_box = MP4_BoxGet(p_sample, "tsro", 0);
More information about the vlc-commits
mailing list