[vlc-commits] demux: mp4: rtp setup: add checks and simplify tsro
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:26:55 2016 +0200| [7f29c6eae82fa697f05dfe7eed5004d09efc1479] | committer: Francois Cartegnie
demux: mp4: rtp setup: add checks and simplify tsro
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f29c6eae82fa697f05dfe7eed5004d09efc1479
---
modules/demux/mp4/essetup.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/modules/demux/mp4/essetup.c b/modules/demux/mp4/essetup.c
index 724abbf..a487eac 100644
--- a/modules/demux/mp4/essetup.c
+++ b/modules/demux/mp4/essetup.c
@@ -290,19 +290,13 @@ static int SetupRTPReceptionHintTrack( demux_t *p_demux, mp4_track_t *p_track, M
BOXDATA(p_tssy)->i_reserved_timestamp_sync & 0x03;
}
- MP4_Box_t *p_tsro_box = MP4_BoxGet(p_sample, "tsro", 0);
- if( p_tsro_box != NULL )
- {
- MP4_Box_data_tsro_t *p_tsro = p_tsro_box->data.p_tsro;
- msg_Dbg(p_demux, "setting tsro: %d",
- p_tsro->i_offset);
- p_track->i_tsro_offset = p_tsro->i_offset;
- }
+ const MP4_Box_t *p_tsro = MP4_BoxGet(p_sample, "tsro");
+ if( p_tsro && BOXDATA(p_tsro) )
+ p_track->i_tsro_offset = BOXDATA(p_tsro)->i_offset;
else
- {
- msg_Dbg(p_demux, "No tsro box present. Assuming 0 as track offset");
- p_track->i_tsro_offset = 0;
- }
+ msg_Dbg(p_demux, "No tsro box present");
+ msg_Dbg(p_demux, "setting tsro: %" PRId32, p_track->i_tsro_offset);
+
return 1;
}
More information about the vlc-commits
mailing list