mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
flacenc: Don't crash if there is no image tag information
https://bugzilla.gnome.org/show_bug.cgi?id=705018
This commit is contained in:
parent
1fbb6d30a6
commit
2fa5c708f3
1 changed files with 6 additions and 2 deletions
|
@ -630,11 +630,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 */
|
||||
|
|
Loading…
Reference in a new issue