flacparse: detect when a file lies about fixed block size
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 14 Nov 2011 15:34:57 +0000 (15:34 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 14 Nov 2011 15:53:36 +0000 (15:53 +0000)
commit011c33e91ec56c64e26312cf5cdb60890a84d32e
tree7b6d6d54f7196e8381c5a72bd4153a5f1ed3accb
parent1169bb05af25d6f0902a8d29c067b237ebfd6849
flacparse: detect when a file lies about fixed block size

If the sample/block number happens to be the same as the block
size, we assume variable block size, and thus counters in samples
in the headers. This can only get us a false positive for a block
size of 1, which is invalid. We can get false negatives more
often though (eg, if not starting at the start of the stream),
but then that's already GIGO.
gst/audioparsers/gstflacparse.c
gst/audioparsers/gstflacparse.h