mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
flacparse: Fix parsing of ISRC from the cuesheets
This commit is contained in:
parent
ffc204e6bd
commit
b01cf1561c
1 changed files with 7 additions and 1 deletions
|
@ -1017,9 +1017,15 @@ gst_flac_parse_handle_cuesheet (GstFlacParse * flacparse, GstBuffer * buffer)
|
||||||
goto error;
|
goto error;
|
||||||
if (!gst_byte_reader_get_uint8 (&reader, &track_num))
|
if (!gst_byte_reader_get_uint8 (&reader, &track_num))
|
||||||
goto error;
|
goto error;
|
||||||
if (!gst_byte_reader_skip (&reader, 12))
|
|
||||||
|
if (gst_byte_reader_get_remaining (&reader) < 12)
|
||||||
goto error;
|
goto error;
|
||||||
memcpy (isrc, map.data + gst_byte_reader_get_pos (&reader), 12);
|
memcpy (isrc, map.data + gst_byte_reader_get_pos (&reader), 12);
|
||||||
|
/* \0-terminate the string */
|
||||||
|
isrc[12] = '\0';
|
||||||
|
if (!gst_byte_reader_skip (&reader, 12))
|
||||||
|
goto error;
|
||||||
|
|
||||||
/* skip 14 bytes from CUESHEET_TRACK */
|
/* skip 14 bytes from CUESHEET_TRACK */
|
||||||
if (!gst_byte_reader_skip (&reader, 14))
|
if (!gst_byte_reader_skip (&reader, 14))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in a new issue