[flac-dev] Creating a SEEKTABLE block during encoding

alex at softopt-it.co.uk alex at softopt-it.co.uk
Thu Nov 24 14:39:41 UTC 2016


I am trying to encode a stream to FLAC and want the encoder to create a
SEEKTABLE but I cannot get it to work as the table always contains only
place holder points. All other aspects of the produced FLAC file seem
OK.  

In order to eliminate anything in our system I modified the encoder
sample code from the website and it behaves the same which make me think
I'm missing something.  

I changed the section where the meta data is added to the encoder to add
a seek table block.  

  (metadata[2] =
FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE)) == NULL ||
 
!FLAC__metadata_object_seektable_template_append_placeholders(metadata[2],16)
|| 

   ... 

   ok = FLAC__stream_encoder_set_metadata(encoder, metadata, 3); 

I don't really understand the details of the seek table but my thinking
here is that I am giving the encoder a template to populate up to 16
seek points. The documentation says the encoder will modify the seek
table block during encoding but the passed meta block (which I retain
ownbership of) still contains only place holders at the end of the
encoding. The seek table block is written to the file but has only
placeholder points. 

What am I missing? 

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/flac-dev/attachments/20161124/40b47c0f/attachment.html>


More information about the flac-dev mailing list