ogg: Don't add tags to empty taglist

This commit is contained in:
Edward Hervey 2017-10-31 10:34:26 +01:00 committed by Edward Hervey
parent 5bcc1e2b57
commit e638f81165

View file

@ -811,6 +811,9 @@ extract_tags_vp8 (GstOggStream * pad, ogg_packet * packet)
tag_list_from_vorbiscomment_packet (packet, tag_list_from_vorbiscomment_packet (packet,
(const guint8 *) "OVP80\2 ", 7, &pad->taglist); (const guint8 *) "OVP80\2 ", 7, &pad->taglist);
if (!pad->taglist)
pad->taglist = gst_tag_list_new_empty ();
gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_VIDEO_CODEC, "VP8", NULL); GST_TAG_VIDEO_CODEC, "VP8", NULL);
} }
@ -1142,6 +1145,9 @@ extract_tags_flac (GstOggStream * pad, ogg_packet * packet)
tag_list_from_vorbiscomment_packet (packet, tag_list_from_vorbiscomment_packet (packet,
packet->packet, 4, &pad->taglist); packet->packet, 4, &pad->taglist);
if (!pad->taglist)
pad->taglist = gst_tag_list_new_empty ();
gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_AUDIO_CODEC, "FLAC", NULL); GST_TAG_AUDIO_CODEC, "FLAC", NULL);
} }
@ -2102,6 +2108,9 @@ extract_tags_opus (GstOggStream * pad, ogg_packet * packet)
tag_list_from_vorbiscomment_packet (packet, tag_list_from_vorbiscomment_packet (packet,
(const guint8 *) "OpusTags", 8, &pad->taglist); (const guint8 *) "OpusTags", 8, &pad->taglist);
if (!pad->taglist)
pad->taglist = gst_tag_list_new_empty ();
gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE, gst_tag_list_add (pad->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_AUDIO_CODEC, "Opus", NULL); GST_TAG_AUDIO_CODEC, "Opus", NULL);
} }