various: fix various typos in the code base

Signed-off-by: Alexander Seiler <seileralex@gmail.com>
This commit is contained in:
Alexander Seiler 2023-03-28 17:16:42 +02:00 committed by Dudemanguy
parent 292a5868cb
commit bdf7b5c3b8
9 changed files with 28 additions and 28 deletions

View File

@ -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``.

View File

@ -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``

View File

@ -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;

View File

@ -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);

View File

@ -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;
}

View File

@ -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;

View File

@ -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 {

View File

@ -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.

View File

@ -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;
}