mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
flacparse: skip PICTURE headers without any image data
Fixes warning if the image length is 0.
This commit is contained in:
parent
1d17ed116d
commit
615f6e55c1
1 changed files with 5 additions and 2 deletions
|
@ -1136,8 +1136,11 @@ gst_flac_parse_handle_picture (GstFlacParse * flacparse, GstBuffer * buffer)
|
||||||
flacparse->tags = gst_tag_list_new_empty ();
|
flacparse->tags = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
GST_INFO_OBJECT (flacparse, "Got image of %d bytes", img_len);
|
GST_INFO_OBJECT (flacparse, "Got image of %d bytes", img_len);
|
||||||
|
|
||||||
|
if (img_len > 0) {
|
||||||
gst_tag_list_add_id3_image (flacparse->tags,
|
gst_tag_list_add_id3_image (flacparse->tags,
|
||||||
map.data + gst_byte_reader_get_pos (&reader), img_len, img_type);
|
map.data + gst_byte_reader_get_pos (&reader), img_len, img_type);
|
||||||
|
}
|
||||||
|
|
||||||
if (gst_tag_list_is_empty (flacparse->tags)) {
|
if (gst_tag_list_is_empty (flacparse->tags)) {
|
||||||
gst_tag_list_unref (flacparse->tags);
|
gst_tag_list_unref (flacparse->tags);
|
||||||
|
|
Loading…
Reference in a new issue