summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Seiler <seileralex@gmail.com>2023-03-28 17:16:42 +0200
committerDudemanguy <random342@airmail.cc>2023-03-28 19:29:44 +0000
commitbdf7b5c3b81033a61e218808a95fd3144f20d993 (patch)
tree619c4a9ad0da5c5c274d52c65d0e0bdc6306dbec
parent292a5868cb60c481ae9eaed7d21e67dcff41938f (diff)
downloadmpv-bdf7b5c3b81033a61e218808a95fd3144f20d993.tar.bz2
mpv-bdf7b5c3b81033a61e218808a95fd3144f20d993.tar.xz
various: fix various typos in the code base
Signed-off-by: Alexander Seiler <seileralex@gmail.com>
-rw-r--r--DOCS/man/input.rst2
-rw-r--r--DOCS/man/osc.rst2
-rw-r--r--demux/demux.c14
-rw-r--r--misc/random.h2
-rw-r--r--player/lua.c10
-rw-r--r--sub/filter_sdh.c4
-rw-r--r--video/mp_image.c4
-rw-r--r--video/out/gpu/ra.h2
-rw-r--r--video/out/vo_sixel.c16
9 files changed, 28 insertions, 28 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 6424d24adb..de2f8353bf 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -2565,7 +2565,7 @@ Property list
is unavailable if no video is active.
When setting this property in the fullscreen or maximized state, the behavior
- is the same as window-scale. In all ther cases, setting the value of this
+ is the same as window-scale. In all other cases, setting the value of this
property will always resize the window. This does not affect the value of
``window-scale``.
diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst
index adcb52cbec..f91ff567f9 100644
--- a/DOCS/man/osc.rst
+++ b/DOCS/man/osc.rst
@@ -174,7 +174,7 @@ Configurable Options
``seekbarhandlesize``
Default: 0.6
- Size ratio of the seek handle if ``seekbarstyle`` is set to ``dimaond``
+ Size ratio of the seek handle if ``seekbarstyle`` is set to ``diamond``
or ``knob``. This is relative to the full height of the seekbar.
``seekbarkeyframes``
diff --git a/demux/demux.c b/demux/demux.c
index 3f62661bb9..3ed519318f 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -471,7 +471,7 @@ static void prune_old_packets(struct demux_internal *in);
static void dumper_close(struct demux_internal *in);
static void demux_convert_tags_charset(struct demuxer *demuxer);
-static uint64_t get_foward_buffered_bytes(struct demux_stream *ds)
+static uint64_t get_forward_buffered_bytes(struct demux_stream *ds)
{
if (!ds->reader_head)
return 0;
@@ -541,7 +541,7 @@ static void check_queue_consistency(struct demux_internal *in)
// ...reader_head and others must be in the queue.
assert(is_forward == !!queue->ds->reader_head);
assert(kf_found == !!queue->keyframe_latest);
- uint64_t fw_bytes2 = get_foward_buffered_bytes(queue->ds);
+ uint64_t fw_bytes2 = get_forward_buffered_bytes(queue->ds);
assert(fw_bytes == fw_bytes2);
}
@@ -2124,7 +2124,7 @@ static void add_packet_locked(struct sh_stream *stream, demux_packet_t *dp)
ds->base_ts = queue->last_ts;
const char *num_pkts = queue->head == queue->tail ? "1" : ">1";
- uint64_t fw_bytes = get_foward_buffered_bytes(ds);
+ uint64_t fw_bytes = get_forward_buffered_bytes(ds);
MP_TRACE(in, "append packet to %s: size=%zu pts=%f dts=%f pos=%"PRIi64" "
"[num=%s size=%zd]\n", stream_type_name(stream->type),
dp->len, dp->pts, dp->dts, dp->pos, num_pkts, (size_t)fw_bytes);
@@ -2218,7 +2218,7 @@ static bool read_packet(struct demux_internal *in)
if (!in->hyst_active)
prefetch_more |= ds->queue->last_ts - ds->base_ts < in->min_secs;
}
- total_fw_bytes += get_foward_buffered_bytes(ds);
+ total_fw_bytes += get_forward_buffered_bytes(ds);
}
MP_TRACE(in, "bytes=%zd, read_more=%d prefetch_more=%d, refresh_more=%d\n",
@@ -2239,7 +2239,7 @@ static bool read_packet(struct demux_internal *in)
for (struct demux_packet *dp = ds->reader_head;
dp; dp = dp->next)
num_pkts++;
- uint64_t fw_bytes = get_foward_buffered_bytes(ds);
+ uint64_t fw_bytes = get_forward_buffered_bytes(ds);
MP_WARN(in, " %s/%d: %zd packets, %zd bytes%s%s\n",
stream_type_name(ds->type), n,
num_pkts, (size_t)fw_bytes,
@@ -2320,7 +2320,7 @@ static void prune_old_packets(struct demux_internal *in)
uint64_t fw_bytes = 0;
for (int n = 0; n < in->num_streams; n++) {
struct demux_stream *ds = in->streams[n]->ds;
- fw_bytes += get_foward_buffered_bytes(ds);
+ fw_bytes += get_forward_buffered_bytes(ds);
}
uint64_t max_avail = in->max_bytes_bw;
// Backward cache (if enabled at all) can use unused forward cache.
@@ -4520,7 +4520,7 @@ void demux_get_reader_state(struct demuxer *demuxer, struct demux_reader_state *
r->ts_end = MP_PTS_MAX(r->ts_end, ds->queue->last_ts);
any_packets |= !!ds->reader_head;
}
- r->fw_bytes += get_foward_buffered_bytes(ds);
+ r->fw_bytes += get_forward_buffered_bytes(ds);
}
r->idle = (!in->reading && !r->underrun) || r->eof;
r->underrun &= !r->idle && in->threading;
diff --git a/misc/random.h b/misc/random.h
index 9a3bef2fbc..dae66a0939 100644
--- a/misc/random.h
+++ b/misc/random.h
@@ -29,7 +29,7 @@
void mp_rand_seed(uint64_t seed);
/*
- * Return the next 64-bit psuedo-random integer, and update the state
+ * Return the next 64-bit pseudo-random integer, and update the state
* accordingly.
*/
uint64_t mp_rand_next(void);
diff --git a/player/lua.c b/player/lua.c
index 9b53b76465..80d0dc5b79 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -123,7 +123,7 @@ static void mp_lua_optarg(lua_State *L, int arg)
// autofree: avoid leaks if a lua-error occurs between talloc new/free.
// If a lua c-function does a new allocation (not tied to an existing context),
-// and an uncaught lua-error occures before "free" - the allocation is leaked.
+// and an uncaught lua-error occurs before "free" - the allocation is leaked.
// autofree lua C function: same as lua_CFunction but with these differences:
// - It accepts an additional void* argument - a pre-initialized talloc context
@@ -174,7 +174,7 @@ static void add_af_mpv_alloc(void *parent, char *ma)
// Perform the equivalent of mpv_free_node_contents(node) when tmp is freed.
-static void steal_node_alloctions(void *tmp, mpv_node *node)
+static void steal_node_allocations(void *tmp, mpv_node *node)
{
talloc_steal(tmp, node_get_alloc(node));
}
@@ -552,7 +552,7 @@ static int script_raw_wait_event(lua_State *L, void *tmp)
struct mpv_node rn;
mpv_event_to_node(&rn, event);
- steal_node_alloctions(tmp, &rn);
+ steal_node_allocations(tmp, &rn);
pushnode(L, &rn); // event
@@ -924,7 +924,7 @@ static int script_get_property_native(lua_State *L, void *tmp)
mpv_node node;
int err = mpv_get_property(ctx->client, name, MPV_FORMAT_NODE, &node);
if (err >= 0) {
- steal_node_alloctions(tmp, &node);
+ steal_node_allocations(tmp, &node);
pushnode(L, &node);
return 1;
}
@@ -975,7 +975,7 @@ static int script_command_native(lua_State *L, void *tmp)
makenode(tmp, &node, L, 1);
int err = mpv_command_node(ctx->client, &node, &result);
if (err >= 0) {
- steal_node_alloctions(tmp, &result);
+ steal_node_allocations(tmp, &result);
pushnode(L, &result);
return 1;
}
diff --git a/sub/filter_sdh.c b/sub/filter_sdh.c
index 23feaffa84..69fca9f892 100644
--- a/sub/filter_sdh.c
+++ b/sub/filter_sdh.c
@@ -238,7 +238,7 @@ static bool skip_bracketed(struct sd_filter *sd, char **rpp, struct buffer *buf)
// return true if parenthesized text was removed.
// if not valid SDH read pointer and write buffer position will be unchanged
// otherwise they point to next position after text and next write position
-static bool skip_parenthesed(struct sd_filter *sd, char **rpp, struct buffer *buf)
+static bool skip_parenthesized(struct sd_filter *sd, char **rpp, struct buffer *buf)
{
int filter_harder = sd->opts->sub_filter_SDH_harder;
char *rp = *rpp;
@@ -378,7 +378,7 @@ static char *filter_SDH(struct sd_filter *sd, char *data, int length, ptrdiff_t
line_with_text = true;
}
} else if (rp[0] == '(') {
- if (!skip_parenthesed(sd, &rp, buf)) {
+ if (!skip_parenthesized(sd, &rp, buf)) {
append(sd, buf, rp[0]);
rp++;
line_with_text = true;
diff --git a/video/mp_image.c b/video/mp_image.c
index c061cb6a16..bc29d298e2 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -136,7 +136,7 @@ static bool mp_image_fill_alloc(struct mp_image *mpi, int stride_align,
// The allocated size of buffer must be given by buffer_size. buffer_size should
// be at least the value returned by mp_image_get_alloc_size(). If buffer is not
// already aligned to stride_align, the function will attempt to align the
-// pointer itself by incrementing the buffer pointer until ther alignment is
+// pointer itself by incrementing the buffer pointer until their alignment is
// achieved (if buffer_size is not large enough to allow aligning the buffer
// safely, the function fails). To be safe, you may want to overallocate the
// buffer by stride_align bytes, and include the overallocation in buffer_size.
@@ -939,7 +939,7 @@ void mp_image_params_guess_csp(struct mp_image_params *params)
if (params->color.light == MP_CSP_LIGHT_AUTO) {
// HLG is always scene-referred (using its own OOTF), everything else
- // we assume is display-refered by default.
+ // we assume is display-referred by default.
if (params->color.gamma == MP_CSP_TRC_HLG) {
params->color.light = MP_CSP_LIGHT_SCENE_HLG;
} else {
diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h
index 97bb9eeda2..5f229f8bd6 100644
--- a/video/out/gpu/ra.h
+++ b/video/out/gpu/ra.h
@@ -408,7 +408,7 @@ struct ra_fns {
void (*tex_destroy)(struct ra *ra, struct ra_tex *tex);
// Upload data to a texture. This is an extremely common operation. When
- // using a buffer, the contants of the buffer must exactly match the image
+ // using a buffer, the contents of the buffer must exactly match the image
// - conversions between bit depth etc. are not supported. The buffer *may*
// be marked as "in use" while this operation is going on, and the contents
// must not be touched again by the API user until buf_poll returns true.
diff --git a/video/out/vo_sixel.c b/video/out/vo_sixel.c
index 068b47c4f5..dabf43f4ef 100644
--- a/video/out/vo_sixel.c
+++ b/video/out/vo_sixel.c
@@ -77,7 +77,7 @@ struct priv {
int num_cols, num_rows; // terminal size in cells
int canvas_ok; // whether canvas vo->dwidth and vo->dheight are positive
- int previous_histgram_colors;
+ int previous_histogram_colors;
struct mp_rect src_rect;
struct mp_rect dst_rect;
@@ -91,23 +91,23 @@ static const unsigned int depth = 3;
static int detect_scene_change(struct vo* vo)
{
struct priv* priv = vo->priv;
- int previous_histgram_colors = priv->previous_histgram_colors;
- int histgram_colors = 0;
+ int previous_histogram_colors = priv->previous_histogram_colors;
+ int histogram_colors = 0;
// If threshold is set negative, then every frame must be a scene change
if (priv->dither == NULL || priv->opts.threshold < 0)
return 1;
- histgram_colors = sixel_dither_get_num_of_histogram_colors(priv->testdither);
+ histogram_colors = sixel_dither_get_num_of_histogram_colors(priv->testdither);
- int color_difference_count = previous_histgram_colors - histgram_colors;
+ int color_difference_count = previous_histogram_colors - histogram_colors;
color_difference_count = (color_difference_count > 0) ? // abs value
color_difference_count : -color_difference_count;
if (100 * color_difference_count >
- priv->opts.threshold * previous_histgram_colors)
+ priv->opts.threshold * previous_histogram_colors)
{
- priv->previous_histgram_colors = histgram_colors; // update history
+ priv->previous_histogram_colors = histogram_colors; // update history
return 1;
} else {
return 0;
@@ -536,7 +536,7 @@ static int preinit(struct vo *vo)
}
}
- priv->previous_histgram_colors = 0;
+ priv->previous_histogram_colors = 0;
return 0;
}