projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d17ed1
)
flacparse: skip PICTURE headers without any image data
author
Tim-Philipp Müller
<tim@centricular.com>
Tue, 6 May 2014 23:58:15 +0000
(
00:58
+0100)
committer
Tim-Philipp Müller
<tim@centricular.com>
Tue, 6 May 2014 23:58:15 +0000
(
00:58
+0100)
Fixes warning if the image length is 0.
gst/audioparsers/gstflacparse.c
patch
|
blob
|
history
diff --git
a/gst/audioparsers/gstflacparse.c
b/gst/audioparsers/gstflacparse.c
index
cb7a39e
..
d36693b
100644
(file)
--- a/
gst/audioparsers/gstflacparse.c
+++ b/
gst/audioparsers/gstflacparse.c
@@
-1136,8
+1136,11
@@
gst_flac_parse_handle_picture (GstFlacParse * flacparse, GstBuffer * buffer)
flacparse->tags = gst_tag_list_new_empty ();
GST_INFO_OBJECT (flacparse, "Got image of %d bytes", img_len);
- gst_tag_list_add_id3_image (flacparse->tags,
- map.data + gst_byte_reader_get_pos (&reader), img_len, img_type);
+
+ if (img_len > 0) {
+ gst_tag_list_add_id3_image (flacparse->tags,
+ map.data + gst_byte_reader_get_pos (&reader), img_len, img_type);
+ }
if (gst_tag_list_is_empty (flacparse->tags)) {
gst_tag_list_unref (flacparse->tags);