Browse Source

flac: init flac_header_info.i_pts before usage

Depending on FLAC_ParseSyncInfo results, the field might get
non-initialized but still assigned. Remove -Wmaybe-uninitialized warning
on Windows.

Signed-off-by: Tristan Matthews <tmatth@videolan.org>
pull/104/head
Alexandre Janniaux 6 years ago
committed by Tristan Matthews
parent
commit
49dd123315
  1. 3
      modules/demux/flac.c

3
modules/demux/flac.c

@ -226,7 +226,7 @@ static block_t *GetPacketizedBlock( decoder_t *p_packetizer,
{
if( p_block->i_buffer >= FLAC_HEADER_SIZE_MAX )
{
struct flac_header_info headerinfo;
struct flac_header_info headerinfo = { .i_pts = VLC_TICK_INVALID };
int i_ret = FLAC_ParseSyncInfo( p_block->p_buffer, streaminfo, NULL, &headerinfo );
assert( i_ret != 0 ); /* Same as packetizer */
/* Use Frame PTS, not the interpolated one */
@ -832,4 +832,3 @@ static void ParsePicture( demux_t *p_demux, const uint8_t *p_data, size_t i_data
TAB_APPEND( p_sys->i_attachments, p_sys->attachments, p_attachment );
}

Loading…
Cancel
Save