Repository Analysis

mpv-player/mpv

🎥 Command line media player

2.2 Likely human-written View on GitHub
2.2
Adjusted Score
2.2
Raw Score
100%
Time Factor
2026-05-28
Last Push
35,409
Stars
C
Language
175,888
Lines of Code
562
Files
363
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 12LOW 351

Pattern Findings

363 matches across 7 categories. Click a row to expand file-level details.

Over-Commented Block342 hits · 342 pts
SeverityFileLineSnippet
LOWmpv_talloc.h1#include <stdlib.h>
LOWmisc/json.c41 * invalid UTF-8 sequences to replacement characters.
LOWmisc/dispatch.c261// if executing the dispatch items takes time. On the other hand, this function
LOWmisc/io_utils.c21#include <errno.h>
LOWmisc/thread_tools.h21 .wakeup = MP_STATIC_COND_INITIALIZER, \
LOWmisc/thread_tools.h61void mp_cancel_reset(struct mp_cancel *c);
LOWmisc/thread_pool.h1#ifndef MPV_MP_THREAD_POOL_H
LOWmisc/thread_pool.h21// If no worker thread is currently available, it's appended to a list in memory
LOWmisc/jni.h21
LOWmisc/bstr.h81void bstr_lower(struct bstr str);
LOWmisc/bstr.h101//
LOWmisc/bstr.h121// Return the UTF-8 code point at the start of the string.
LOWmisc/codepoint_width.c1#include "codepoint_width.h"
LOWmisc/path_utils.c21#include <stdio.h>
LOWmisc/charset_conv.c21
LOWfilters/f_auto_filters.c1#include <math.h>
LOWfilters/f_autoconvert.h21 // format changes and continue filtering when ready.
LOWfilters/f_autoconvert.h41// otherwise must be 0. (Mismatches lead to conversion errors.)
LOWfilters/f_hwtransfer.c1#include <libavutil/buffer.h>
LOWfilters/f_lavfi.c21#include <math.h>
LOWfilters/f_lavfi.c41#include "common/tags.h"
LOWfilters/filter_internal.h1#pragma once
LOWfilters/filter_internal.h21// In practice, this means process() is repeated.
LOWfilters/filter_internal.h61
LOWfilters/filter_internal.h81 // The common case will be that process() is called running stage 1 a bunch
LOWfilters/filter_internal.h101// Return the mp_filter_info this filter was created with.
LOWfilters/f_swscale.c21#include <math.h>
LOWfilters/f_output_chain.c1#include "audio/aframe.h"
LOWfilters/filter.c1#include <math.h>
LOWfilters/filter.c21// mp_pin.conn is used to skip redundant connected pins.
LOWfilters/f_autoconvert.c1#include "audio/aframe.h"
LOWfilters/f_utils.h1#pragma once
LOWfilters/f_utils.h21// filtering.)
LOWfilters/f_utils.h41
LOWfilters/f_utils.h61void mp_subfilter_destroy(struct mp_subfilter *sub);
LOWfilters/f_async_queue.h1#pragma once
LOWfilters/f_async_queue.h21// further communication until mp_async_queue_resume() is called.
LOWfilters/f_async_queue.h41// accepts no further frames. Always returns false if not active (then it does
LOWfilters/f_async_queue.h61// has read requests on its mp_pin.
LOWfilters/f_async_queue.h81// create one with mp_filter_create_root())
LOWfilters/f_async_queue.h121 // at least 2 samples. Behavior is unclear on timestamp resets (even if EOF
LOWfilters/f_decoder_wrapper.c21#include <stdbool.h>
LOWfilters/f_decoder_wrapper.c41#include "common/recorder.h"
LOWfilters/f_lavfi.h1#pragma once
LOWfilters/f_swresample.c21#include <libavutil/channel_layout.h>
LOWfilters/filter.h1#pragma once
LOWfilters/filter.h41bool mp_pin_in_write(struct mp_pin *p, struct mp_frame frame);
LOWfilters/filter.h61// Read a frame. Returns MP_FRAME_NONE if currently no frame is available.
LOWfilters/filter.h81// If this is called, the next mp_pin_out_read() call will return the same frame
LOWfilters/filter.h101// a typical filter implementation)
LOWfilters/filter.h121// mp_pin_can_transfer_data(). Returns whether a transfer happened.
LOWfilters/filter.h141// on pin state changes. Using mp_pin_set_manual_connection() will default to
LOWfilters/filter.h321 // output (MP_PIN_OUT). This is the default convention for filters. Some
LOWfilters/filter.h421// missing external input or unread output). It returns whether any outside
LOWfilters/filter.h441// call is interrupted and no filtering is done for that call.
LOWfilters/filter.h461struct mp_filter *mp_filter_create_root(struct mpv_global *global);
LOWfilters/f_output_chain.h41 // and the implementation drained the filter chain and unset the internal ao
LOWfilters/f_output_chain.h81
LOWoptions/m_property.h21#include <stdbool.h>
LOWoptions/m_property.h41 // If unimplemented, the property is read-only.
282 more matches not shown…
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippet
MEDIUMTOOLS/gen-interface-changes.py7# This file is part of mpv.
MEDIUMTOOLS/matroska.py12# This file is part of mpv.
MEDIUMTOOLS/file2string.py9# This file is part of mpv.
MEDIUMTOOLS/gen-mpv-desktop.py7# This file is part of mpv.
MEDIUMTOOLS/docutils-wrapper.py8# This file is part of mpv.
MEDIUMetc/_mpv.zsh9# This file is part of mpv.
AI Slop Vocabulary5 hits · 14 pts
SeverityFileLineSnippet
MEDIUMfilters/f_swresample.c567 // Essentially, swr_set_compensation() does 2 things:
MEDIUMvideo/img_format.c364 // is robust.
MEDIUMcommon/recorder.c34// Essentially, this should be higher than the highest supported keyframe
MEDIUMosdep/mac/libmpv_helper.swift111 // so only utilize a newly received FBO ID if it is nonzero.
MEDIUMplayer/core.h86 MPSEEK_FLAG_NOFLUSH = 1 << 1, // keeping remaining data for seamless loops
Excessive Try-Catch Wrapping5 hits · 6 pts
SeverityFileLineSnippet
LOWTOOLS/dylib_unhell.py95 except Exception:
LOWTOOLS/dylib_unhell.py108 except Exception:
MEDIUMTOOLS/dylib_unhell.py89def check_vulkan_max_version(version):
LOWTOOLS/docutils-wrapper.py61except Exception:
LOWTOOLS/macos-sdk-version.py40 except Exception:
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippet
LOWTOOLS/matroska.py428
LOWci/lint-commit-msg.py42
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippet
LOWTOOLS/dylib_unhell.py125def install_name_tool_add_rpath(rpath, binary):
LOWTOOLS/dylib_unhell.py128def install_name_tool_delete_rpath(rpath, binary):
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWTOOLS/uncrustify.cfg1# Usage: