summaryrefslogtreecommitdiff
path: root/plugins/converter
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-04-07 08:45:37 +0200
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-04-07 08:45:37 +0200
commitae424856f80cffa876fcba36aebc205ac4d7f923 (patch)
tree5d1212fbd0f843d4350037cdef261e4909eb877c /plugins/converter
parent4eed226e43370bf4759ed9f655e5fcf0546a9a3c (diff)
added opus metadata writing support to converter (when stdopus plugin is present)
Diffstat (limited to 'plugins/converter')
-rw-r--r--plugins/converter/converter.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/plugins/converter/converter.c b/plugins/converter/converter.c
index 17be3036..04faaae3 100644
--- a/plugins/converter/converter.c
+++ b/plugins/converter/converter.c
@@ -1158,20 +1158,18 @@ error:
if (encoder_preset->tag_oggvorbis) {
// find flac decoder plugin
DB_decoder_t **plugs = deadbeef->plug_get_decoder_list ();
- DB_decoder_t *ogg = NULL;
+ int res = -1;
for (int i = 0; plugs[i]; i++) {
- if (!strcmp (plugs[i]->plugin.id, "stdogg")) {
- ogg = plugs[i];
- break;
+ if (!strcmp (plugs[i]->plugin.id, "stdogg")
+ || !strcmp (plugs[i]->plugin.id, "stdopus")) {
+ res = plugs[i]->write_metadata (out_it);
+ if (!res) {
+ break;
+ }
}
}
- if (!ogg) {
- fprintf (stderr, "converter: ogg plugin not found, cannot write ogg metadata\n");
- }
- else {
- if (0 != ogg->write_metadata (out_it)) {
- fprintf (stderr, "converter: failed to write ogg metadata, not an ogg file?\n");
- }
+ if (res) {
+ fprintf (stderr, "converter: failed to write ogg metadata, not an ogg file?\n");
}
}
if (out_it) {