diff options
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/AdPlugDecoderPlugin.cxx | 2 | ||||
-rw-r--r-- | src/decoder/DsfDecoderPlugin.cxx | 6 | ||||
-rw-r--r-- | src/decoder/FfmpegMetaData.cxx | 14 | ||||
-rw-r--r-- | src/decoder/VorbisComments.cxx | 10 | ||||
-rw-r--r-- | src/decoder/VorbisDecoderPlugin.cxx | 14 |
5 files changed, 23 insertions, 23 deletions
diff --git a/src/decoder/AdPlugDecoderPlugin.cxx b/src/decoder/AdPlugDecoderPlugin.cxx index 8f2ed3bd7..4ab3a8301 100644 --- a/src/decoder/AdPlugDecoderPlugin.cxx +++ b/src/decoder/AdPlugDecoderPlugin.cxx @@ -72,7 +72,7 @@ adplug_file_decode(Decoder &decoder, const char *path_fs) break; opl.update(buffer, frames_per_buffer); - cmd = decoder_data(decoder, NULL, + cmd = decoder_data(decoder, nullptr, buffer, sizeof(buffer), 0); } while (cmd == DecoderCommand::NONE); diff --git a/src/decoder/DsfDecoderPlugin.cxx b/src/decoder/DsfDecoderPlugin.cxx index 7f47074ee..065bc7958 100644 --- a/src/decoder/DsfDecoderPlugin.cxx +++ b/src/decoder/DsfDecoderPlugin.cxx @@ -314,7 +314,7 @@ dsf_scan_stream(InputStream &is, { /* check DSF metadata */ DsfMetaData metadata; - if (!dsf_read_metadata(NULL, is, &metadata)) + if (!dsf_read_metadata(nullptr, is, &metadata)) return false; AudioFormat audio_format; @@ -338,12 +338,12 @@ dsf_scan_stream(InputStream &is, static const char *const dsf_suffixes[] = { "dsf", - NULL + nullptr }; static const char *const dsf_mime_types[] = { "application/x-dsf", - NULL + nullptr }; const struct DecoderPlugin dsf_decoder_plugin = { diff --git a/src/decoder/FfmpegMetaData.cxx b/src/decoder/FfmpegMetaData.cxx index 17255f0a4..6e92b4a13 100644 --- a/src/decoder/FfmpegMetaData.cxx +++ b/src/decoder/FfmpegMetaData.cxx @@ -32,7 +32,7 @@ static const struct tag_table ffmpeg_tags[] = { { "album_artist-sort", TAG_ALBUM_ARTIST_SORT }, /* sentinel */ - { NULL, TAG_NUM_OF_ITEM_TYPES } + { nullptr, TAG_NUM_OF_ITEM_TYPES } }; static void @@ -40,9 +40,9 @@ ffmpeg_copy_metadata(TagType type, AVDictionary *m, const char *name, const struct tag_handler *handler, void *handler_ctx) { - AVDictionaryEntry *mt = NULL; + AVDictionaryEntry *mt = nullptr; - while ((mt = av_dict_get(m, name, mt, 0)) != NULL) + while ((mt = av_dict_get(m, name, mt, 0)) != nullptr) tag_handler_invoke_tag(handler, handler_ctx, type, mt->value); } @@ -51,9 +51,9 @@ static void ffmpeg_scan_pairs(AVDictionary *dict, const struct tag_handler *handler, void *handler_ctx) { - AVDictionaryEntry *i = NULL; + AVDictionaryEntry *i = nullptr; - while ((i = av_dict_get(dict, "", i, AV_DICT_IGNORE_SUFFIX)) != NULL) + while ((i = av_dict_get(dict, "", i, AV_DICT_IGNORE_SUFFIX)) != nullptr) tag_handler_invoke_pair(handler, handler_ctx, i->key, i->value); } @@ -67,10 +67,10 @@ ffmpeg_scan_dictionary(AVDictionary *dict, handler, handler_ctx); for (const struct tag_table *i = ffmpeg_tags; - i->name != NULL; ++i) + i->name != nullptr; ++i) ffmpeg_copy_metadata(i->type, dict, i->name, handler, handler_ctx); - if (handler->pair != NULL) + if (handler->pair != nullptr) ffmpeg_scan_pairs(dict, handler, handler_ctx); } diff --git a/src/decoder/VorbisComments.cxx b/src/decoder/VorbisComments.cxx index 8fd078ff4..d4f019b58 100644 --- a/src/decoder/VorbisComments.cxx +++ b/src/decoder/VorbisComments.cxx @@ -43,7 +43,7 @@ vorbis_comment_value(const char *comment, const char *needle) comment[len] == '=') return comment + len + 1; - return NULL; + return nullptr; } bool @@ -91,7 +91,7 @@ vorbis_copy_comment(const char *comment, const char *value; value = vorbis_comment_value(comment, name); - if (value != NULL) { + if (value != nullptr) { tag_handler_invoke_tag(handler, handler_ctx, tag_type, value); return true; } @@ -103,11 +103,11 @@ static void vorbis_scan_comment(const char *comment, const struct tag_handler *handler, void *handler_ctx) { - if (handler->pair != NULL) { + if (handler->pair != nullptr) { char *name = g_strdup((const char*)comment); char *value = strchr(name, '='); - if (value != NULL && value > name) { + if (value != nullptr && value > name) { *value++ = 0; tag_handler_invoke_pair(handler, handler_ctx, name, value); @@ -116,7 +116,7 @@ vorbis_scan_comment(const char *comment, g_free(name); } - for (const struct tag_table *i = xiph_tags; i->name != NULL; ++i) + for (const struct tag_table *i = xiph_tags; i->name != nullptr; ++i) if (vorbis_copy_comment(comment, i->name, i->type, handler, handler_ctx)) return; diff --git a/src/decoder/VorbisDecoderPlugin.cxx b/src/decoder/VorbisDecoderPlugin.cxx index 8e59afe3b..075e3c730 100644 --- a/src/decoder/VorbisDecoderPlugin.cxx +++ b/src/decoder/VorbisDecoderPlugin.cxx @@ -133,9 +133,9 @@ vorbis_is_open(struct vorbis_input_stream *vis, OggVorbis_File *vf, vis->input_stream = &input_stream; vis->seekable = input_stream.CheapSeeking(); - int ret = ov_open_callbacks(vis, vf, NULL, 0, vorbis_is_callbacks); + int ret = ov_open_callbacks(vis, vf, nullptr, 0, vorbis_is_callbacks); if (ret < 0) { - if (decoder == NULL || + if (decoder == nullptr || decoder_get_command(*decoder) == DecoderCommand::NONE) FormatWarning(vorbis_domain, "Failed to open Ogg Vorbis stream: %s", @@ -191,7 +191,7 @@ vorbis_stream_decode(Decoder &decoder, return; const vorbis_info *vi = ov_info(&vf, -1); - if (vi == NULL) { + if (vi == nullptr) { LogWarning(vorbis_domain, "ov_info() has failed"); return; } @@ -265,7 +265,7 @@ vorbis_stream_decode(Decoder &decoder, if (current_section != prev_section) { vi = ov_info(&vf, -1); - if (vi == NULL) { + if (vi == nullptr) { LogWarning(vorbis_domain, "ov_info() has failed"); break; @@ -309,7 +309,7 @@ vorbis_scan_stream(InputStream &is, struct vorbis_input_stream vis; OggVorbis_File vf; - if (!vorbis_is_open(&vis, &vf, NULL, is)) + if (!vorbis_is_open(&vis, &vf, nullptr, is)) return false; tag_handler_invoke_duration(handler, handler_ctx, @@ -323,7 +323,7 @@ vorbis_scan_stream(InputStream &is, } static const char *const vorbis_suffixes[] = { - "ogg", "oga", NULL + "ogg", "oga", nullptr }; static const char *const vorbis_mime_types[] = { @@ -335,7 +335,7 @@ static const char *const vorbis_mime_types[] = { "audio/x-ogg", "audio/x-vorbis", "audio/x-vorbis+ogg", - NULL + nullptr }; const struct DecoderPlugin vorbis_decoder_plugin = { |