summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-07-28 18:04:32 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-07-28 18:10:54 +0200
commita07c3c796eca9996075a8d9863d9b3400c75759e (patch)
tree6b3e0157f132bc7b3325767fe1fcddf773a7c2b4
parent3979184d956d2702357529af4d02d7506b577f07 (diff)
downloadgst-plugins-good-a07c3c796eca9996075a8d9863d9b3400c75759e.tar.gz
gst-plugins-good-a07c3c796eca9996075a8d9863d9b3400c75759e.tar.xz
flacenc: Don't crash if there is no image tag information
https://bugzilla.gnome.org/show_bug.cgi?id=705018
-rw-r--r--ext/flac/gstflacenc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c
index 07361d227..570c908bf 100644
--- a/ext/flac/gstflacenc.c
+++ b/ext/flac/gstflacenc.c
@@ -640,11 +640,15 @@ gst_flac_enc_set_metadata (GstFlacEnc * flacenc, GstAudioInfo * info,
continue;
}
+ structure = gst_sample_get_info (sample);
+ if (!structure) {
+ GST_ERROR_OBJECT (flacenc, "No image tag info");
+ continue;
+ }
+
flacenc->meta[entries] =
FLAC__metadata_object_new (FLAC__METADATA_TYPE_PICTURE);
- structure = gst_sample_get_info (sample);
-
gst_structure_get (structure, "image-type", GST_TYPE_TAG_IMAGE_TYPE,
&image_type, NULL);
/* Convert to ID3v2 APIC image type */