Skip to content
Snippets Groups Projects
Commit 1cd8422a authored by François Cartegnie's avatar François Cartegnie :fingers_crossed: Committed by Jean-Baptiste Kempf
Browse files

packetizer: flac: fix fixed blocksize streams last pts

parent 6aeaeb61
No related branches found
No related tags found
No related merge requests found
......@@ -281,7 +281,10 @@ static inline int FLAC_ParseSyncInfo(const uint8_t *p_buf, unsigned i_buf,
/* Compute from frame absolute time */
if ( (p_buf[1] & 0x01) == 0 ) /* Fixed blocksize stream / Frames */
h->i_pts = VLC_TICK_0 + vlc_tick_from_samples(blocksize * i_fsnumber, samplerate);
{
const unsigned fixedblocksize = stream_info ? stream_info->min_blocksize : blocksize;
h->i_pts = VLC_TICK_0 + vlc_tick_from_samples(fixedblocksize * i_fsnumber, samplerate);
}
else /* Variable blocksize stream / Samples */
h->i_pts = VLC_TICK_0 + vlc_tick_from_samples(i_fsnumber, samplerate);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment