summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/changes.rst3
-rw-r--r--DOCS/man/en/encode.rst5
-rw-r--r--DOCS/man/en/options.rst32
-rw-r--r--DOCS/man/en/vo.rst3
-rw-r--r--Makefile1
-rw-r--r--TOOLS/vf_dlopen/Makefile2
-rw-r--r--TOOLS/vf_dlopen/ildetect.c296
-rwxr-xr-xTOOLS/vf_dlopen/ildetect.sh38
-rw-r--r--audio/decode/ad_mpg123.c13
-rw-r--r--audio/decode/dec_audio.c2
-rw-r--r--audio/format.c10
-rw-r--r--audio/format.h4
-rw-r--r--audio/out/ao.c74
-rw-r--r--audio/out/ao.h18
-rw-r--r--audio/out/ao_alsa.c17
-rw-r--r--audio/out/ao_coreaudio.c1320
-rw-r--r--audio/out/ao_dsound.c14
-rw-r--r--audio/out/ao_jack.c50
-rw-r--r--audio/out/ao_lavc.c13
-rw-r--r--audio/out/ao_null.c17
-rw-r--r--audio/out/ao_openal.c3
-rw-r--r--audio/out/ao_oss.c52
-rw-r--r--audio/out/ao_pcm.c3
-rw-r--r--audio/out/ao_portaudio.c68
-rw-r--r--audio/out/ao_pulse.c2
-rw-r--r--audio/out/ao_rsound.c2
-rw-r--r--audio/out/ao_sdl.c46
-rw-r--r--audio/out/audio_out_internal.h66
-rw-r--r--core/command.c6
-rw-r--r--core/encode_lavc.c60
-rw-r--r--core/mp_memory_barrier.h23
-rw-r--r--core/mp_ring.c155
-rw-r--r--core/mp_ring.h125
-rw-r--r--core/mplayer.c60
-rw-r--r--core/options.c15
-rw-r--r--core/options.h4
-rw-r--r--demux/demux_lavf.c23
-rw-r--r--etc/encoding-example-profiles.conf6
-rw-r--r--video/filter/vf_dlopen.c26
-rw-r--r--video/image_writer.c6
-rw-r--r--video/image_writer.h1
-rw-r--r--video/out/cocoa_common.h2
-rw-r--r--video/out/cocoa_common.m36
-rw-r--r--video/out/gl_video.c91
-rw-r--r--video/out/vo.c75
-rw-r--r--video/out/vo.h8
-rw-r--r--video/out/vo_lavc.c70
-rw-r--r--video/out/vo_sdl.c6
-rw-r--r--video/out/vo_xv.c6
-rw-r--r--video/out/w32_common.c33
-rw-r--r--video/out/w32_common.h1
-rw-r--r--video/out/wayland_common.c4
-rw-r--r--video/out/x11_common.c19
53 files changed, 1830 insertions, 1205 deletions
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst
index c1d924e224..de3b24b710 100644
--- a/DOCS/man/en/changes.rst
+++ b/DOCS/man/en/changes.rst
@@ -64,7 +64,7 @@ General changes for mplayer2 to mpv
* Encoding functionality (replacement for mencoder, see ``DOCS/encoding.rst``)
* Remove ``--vo=gif89a``, ``--vo=md5sum``, ``--vo=yuv4mpeg``, as encoding can
handle these use cases. For yuv4mpeg, for example, use:
- ``mpv input.mkv -o output.y4m --no-audio``.
+ ``mpv input.mkv -o output.y4m --no-audio --oautofps --oneverdrop``.
* Image subtitles (DVDs etc.) are rendered in color and use more correct
positioning (color can be disabled with ``--sub-gray``)
* General code cleanups
@@ -127,6 +127,7 @@ Command line switches
-a52drc level --ad-lavc-ac3drc=level
-dumpstream --stream-dump=<filename>
-capture --stream-capture=<filename>
+ -stop-xscreensaver --stop-screensaver
=================================== ===================================
*NOTE*: ``-opt val`` becomes ``--opt=val``.
diff --git a/DOCS/man/en/encode.rst b/DOCS/man/en/encode.rst
index 93b1b84f28..0676cb1479 100644
--- a/DOCS/man/en/encode.rst
+++ b/DOCS/man/en/encode.rst
@@ -45,6 +45,11 @@ You can encode files from one format/codec to another using this facility.
specified - use --ofps or --oautofps to force CFR encoding in these
cases.
+--omaxfps=<float value>
+ Specifies the minimum distance of adjacent frames (default: 0, which means
+ unset). Content of lower frame rate is not readjusted to this frame rate;
+ content of higher frame rate is decimated to this frame rate.
+
--oharddup
If set, the frame rate given by --ofps is attained not by skipping time
codes, but by duplicating frames (constant frame rate mode).
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 3aa94ff33e..304eeba464 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -1,7 +1,3 @@
---abs=<value>
- (``--ao=oss`` only) (OBSOLETE)
- Override audio driver/card buffer size detection.
-
--ad=<[+|-]family1:(*|decoder1),[+|-]family2:(*|decoder2),...[-]>
Specify a priority list of audio decoders to be used, according to their
family and decoder name. Entries like ``family:*`` prioritize all decoders
@@ -790,7 +786,7 @@
``-vo=null``).
This can be "misused" to disable screensavers that do not support the
- proper X API (see also ``--stop-xscreensaver``). If you think this is too
+ proper X API (see also ``--stop-screensaver``). If you think this is too
complicated, ask the author of the screensaver program to support the
proper X APIs.
@@ -1800,6 +1796,12 @@
to write a screenshot. Too high compression might occupy enough CPU time to
interrupt playback. The default is 7.
+--screenshot-png-filter=<0-5>
+ Set the filter applied prior to PNG compression. 0 is none, 1 is "sub", 2 is
+ "up", 3 is "average", 4 is "Paeth", and 5 is "mixed". This affects the level
+ of compression that can be achieved. For most images, "mixed" achieves the
+ best compression ratio, hence it is the default.
+
--screenshot-template=<template>
Specify the filename template used to save screenshots. The template
specifies the filename without file extension, and can contain format
@@ -1982,18 +1984,13 @@
*NOTE*: without ``--hr-seek``, skipping will snap to keyframes.
---stereo=<mode>
- Select type of MP2/MP3 stereo output.
+--stop-screensaver, --no-stop-screensaver
+ Turns off the screensaver (or screen blanker and similar mechanisms) at
+ startup and turns it on again on exit. (Default: yes)
- :0: stereo
- :1: left channel
- :2: right channel
-
---stop-xscreensaver
- (X11 only)
- Turns off xscreensaver at startup and turns it on again on exit. If your
- screensaver supports neither the XSS nor XResetScreenSaver API please use
- ``--heartbeat-cmd`` instead.
+ This is not supported on all video outputs or platforms. Sometimes it is
+ implemented, but doesn't work (happens often on GNOME). You might be able
+ to to work this around using ``--heartbeat-cmd`` instead.
--sub=<subtitlefile1,subtitlefile2,...>
Use/display these subtitle files. Only one file can be displayed at the
@@ -2127,6 +2124,9 @@
Set the window title. Properties are expanded on playback start.
(See property_expansion_.)
+ *NOTE*: There is a danger of this causing significant CPU usage,
+ depending on the properties used and the window manager.
+
--tv=<option1:option2:...>
This option tunes various properties of the TV capture module. For
watching TV with mpv, use ``tv://`` or ``tv://<channel_number>`` or
diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst
index 251e71ce03..079e146f8a 100644
--- a/DOCS/man/en/vo.rst
+++ b/DOCS/man/en/vo.rst
@@ -708,6 +708,9 @@ image
png-compression=<0-9>
PNG compression factor (speed vs. file size tradeoff) (default: 7)
+ png-filter=<0-5>
+ Filter applied prior to PNG compression (0 = none; 1 = sub; 2 = up;
+ 3 = average; 4 = Paeth; 5 = mixed) (default: 5)
jpeg-quality=<0-100>
JPEG quality factor (default: 90)
[no-]jpeg-progressive
diff --git a/Makefile b/Makefile
index 10beb26df9..9ac246dc36 100644
--- a/Makefile
+++ b/Makefile
@@ -179,6 +179,7 @@ SOURCES = talloc.c \
core/mp_common.c \
core/mp_fifo.c \
core/mp_msg.c \
+ core/mp_ring.c \
core/mplayer.c \
core/options.c \
core/parser-cfg.c \
diff --git a/TOOLS/vf_dlopen/Makefile b/TOOLS/vf_dlopen/Makefile
index c1eb5e0c9f..8057676d57 100644
--- a/TOOLS/vf_dlopen/Makefile
+++ b/TOOLS/vf_dlopen/Makefile
@@ -19,7 +19,7 @@
# 02110-1301 USA
#
-FILTERS = showqscale telecine tile rectangle framestep
+FILTERS = showqscale telecine tile rectangle framestep ildetect
COMMON = filterutils.o
OBJECTS = $(patsubst %,%.o,$(FILTERS)) $(COMMON)
diff --git a/TOOLS/vf_dlopen/ildetect.c b/TOOLS/vf_dlopen/ildetect.c
new file mode 100644
index 0000000000..1ac1c08946
--- /dev/null
+++ b/TOOLS/vf_dlopen/ildetect.c
@@ -0,0 +1,296 @@
+/*
+ * Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org>
+ *
+ * This file is part of mpv's vf_dlopen examples.
+ *
+ * mpv's vf_dlopen examples are free software; you can redistribute them and/or
+ * modify them under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of the
+ * License, or (at your option) any later version.
+ *
+ * mpv's vf_dlopen examples are distributed in the hope that they will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv's vf_dlopen examples; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include "vf_dlopen.h"
+
+#include "filterutils.h"
+
+/*
+ * interlacing detector
+ *
+ * usage: -vf dlopen=./ildetect.so:<method>:<threshold>
+ *
+ * outputs an interlacing detection report at the end
+ *
+ * methods:
+ * 0 = transcode 32detect (default)
+ * 1 = decomb IsCombed
+ * 2 = IsCombedTIVTC
+ * 3 = simple average
+ *
+ * threshold:
+ * normalized at 1
+ */
+
+typedef struct {
+ int method;
+ double combing_threshold;
+ double motion_threshold;
+ double motion_amount;
+ double yes_threshold;
+ double no_threshold;
+ double total_yes_threshold;
+ double total_no_threshold;
+ double tc_threshold;
+ double decision_threshold;
+ double tc_decision_threshold;
+ double lastcombed;
+ int numtotalframes;
+ int numdecidedframes;
+ int totalcombedframes;
+ int numjumpingadjacentframes;
+ int numdecidedadjacentframes;
+ unsigned char *buffer_data;
+ size_t buffer_size;
+} ildetect_data_t;
+
+static int il_config(struct vf_dlopen_context *ctx)
+{
+ ctx->out_height -= 4;
+ ctx->out_d_height = ctx->out_height;
+ return 1;
+}
+
+static int il_decision(struct vf_dlopen_context *ctx,
+ int p0, int p1, int p2, int p3, int p4)
+{
+ ildetect_data_t *il = ctx->priv;
+
+ // model for threshold: p0, p2, p4 = 0; p1, p3 = t
+ switch (il->method) {
+ case 0: { // diff-diff (transcode 32detect)
+ int d12 = p1 - p2; // t
+ int d13 = p1 - p3; // 0
+ if (abs(d12) > 15 * il->combing_threshold &&
+ abs(d13) < 10 * il->combing_threshold)
+ return 1;
+ // true for t > 15
+ break;
+ }
+ case 1: { // multiply (decomb IsCombed)
+ int d12 = p1 - p2; // t
+ int d32 = p3 - p2; // t
+ if (d12 * d32 > pow(il->combing_threshold, 2) * (25*25))
+ return 1;
+ // true for t > 21
+ break;
+ }
+ case 2: { // blur-blur (IsCombedTIVTC)
+ int b024 = p0 + 6 * p2 + p4; // 0
+ int b13 = 4 * p1 + 4 * p3; // 8t
+ if (abs(b024 - b13) > il->combing_threshold * 8 * 20)
+ return 1;
+ // true for t > 20
+ break;
+ }
+ case 3: { // average-average
+ int d123 = p1 + p3 - 2 * p2; // 2t
+ int d024 = p0 + p4 - 2 * p2; // 0
+ if ((abs(d123) - abs(d024)) > il->combing_threshold * 30)
+ return 1;
+ // true for t > 15
+ break;
+ }
+ }
+ return 0;
+}
+
+static int il_put_image(struct vf_dlopen_context *ctx)
+{
+ ildetect_data_t *il = ctx->priv;
+ unsigned int x, y;
+ int first_frame = 0;
+
+ size_t sz = ctx->inpic.planestride[0] * ctx->inpic.planeheight[0];
+ if (sz != il->buffer_size) {
+ il->buffer_data = realloc(il->buffer_data, sz);
+ il->buffer_size = sz;
+ first_frame = 1;
+ }
+
+ assert(ctx->inpic.planes == 1);
+ assert(ctx->outpic[0].planes == 1);
+
+ assert(ctx->inpic.planewidth[0] == ctx->outpic[0].planewidth[0]);
+ assert(ctx->inpic.planeheight[0] == ctx->outpic[0].planeheight[0] + 4);
+
+ if (first_frame) {
+ printf("First frame\n");
+ il->lastcombed = -1;
+ } else {
+ // detect interlacing
+ // for each row of 5 pixels, compare:
+ // p2 vs (p1 + p3) / 2
+ // p2 vs (p0 + p4) / 2
+ unsigned int totalcombedframes = 0; // add 255 per combed pixel
+ unsigned int totalpixels = 0;
+ for (y = 0; y < ctx->inpic.planeheight[0] - 4; ++y) {
+ unsigned char *in_line =
+ &ctx->inpic.plane[0][ctx->inpic.planestride[0] * y];
+ unsigned char *buf_line =
+ &il->buffer_data[ctx->inpic.planestride[0] * y];
+ unsigned char *out_line =
+ &ctx->outpic->plane[0][ctx->outpic->planestride[0] * y];
+ for (x = 0; x < ctx->inpic.planewidth[0]; ++x) {
+ int b2 = buf_line[x + ctx->inpic.planestride[0] * 2];
+ int p0 = in_line[x];
+ int p1 = in_line[x + ctx->inpic.planestride[0]];
+ int p2 = in_line[x + ctx->inpic.planestride[0] * 2];
+ int p3 = in_line[x + ctx->inpic.planestride[0] * 3];
+ int p4 = in_line[x + ctx->inpic.planestride[0] * 4];
+ int is_moving = abs(b2 - p2) > il->motion_threshold;
+
+ if (!is_moving) {
+ out_line[x] = 128;
+ continue;
+ }
+
+ ++totalpixels;
+
+ int combed = il_decision(ctx, p0, p1, p2, p3, p4);
+ totalcombedframes += combed;
+ out_line[x] = 255 * combed;
+ }
+ }
+
+ double avgpixels = totalpixels / (double)
+ ((ctx->inpic.planeheight[0] - 4) * ctx->inpic.planewidth[0]);
+
+ if (avgpixels > il->motion_amount) {
+ double avgcombed = totalcombedframes / (double) totalpixels;
+
+ if (il->lastcombed >= 0) {
+ if (il->lastcombed < il->no_threshold ||
+ il->lastcombed > il->yes_threshold)
+ if (avgcombed < il->no_threshold ||
+ avgcombed > il->yes_threshold)
+ ++il->numdecidedadjacentframes;
+ if (il->lastcombed > il->yes_threshold &&
+ avgcombed < il->no_threshold)
+ ++il->numjumpingadjacentframes;
+ if (il->lastcombed < il->no_threshold &&
+ avgcombed > il->yes_threshold)
+ ++il->numjumpingadjacentframes;
+ }
+
+ il->lastcombed = avgcombed;
+
+ if (avgcombed > il->yes_threshold) {
+ ++il->numdecidedframes;
+ ++il->totalcombedframes;
+ } else if (avgcombed < il->no_threshold) {
+ ++il->numdecidedframes;
+ }
+ } else
+ il->lastcombed = -1;
+ }
+
+ ++il->numtotalframes;
+
+ copy_plane(
+ il->buffer_data, ctx->inpic.planestride[0],
+ ctx->inpic.plane[0], ctx->inpic.planestride[0],
+ ctx->inpic.planewidth[0],
+ ctx->inpic.planeheight[0]);
+
+ ctx->outpic[0].pts = ctx->inpic.pts;
+ return 1;
+}
+
+void il_uninit(struct vf_dlopen_context *ctx)
+{
+ ildetect_data_t *il = ctx->priv;
+
+ double avgdecided = il->numtotalframes
+ ? il->numdecidedframes / (double) il->numtotalframes : -1;
+ double avgadjacent = il->numdecidedframes
+ ? il->numdecidedadjacentframes / (double) il->numdecidedframes : -1;
+ double avgscore = il->numdecidedframes
+ ? il->totalcombedframes / (double) il->numdecidedframes : -1;
+ double avgjumps = il->numdecidedadjacentframes
+ ? il->numjumpingadjacentframes / (double) il->numdecidedadjacentframes : -1;
+
+ printf("ildetect: Avg decided: %f\n", avgdecided);
+ printf("ildetect: Avg adjacent decided: %f\n", avgadjacent);
+ printf("ildetect: Avg interlaced decided: %f\n", avgscore);
+ printf("ildetect: Avg interlaced/progressive adjacent decided: %f\n", avgjumps);
+
+ if (avgdecided < il->decision_threshold)
+ avgadjacent = avgscore = avgjumps = -1;
+
+ if (avgadjacent < il->tc_decision_threshold)
+ avgadjacent = avgjumps = -1;
+
+ if (avgscore < 0)
+ printf("ildetect: Content is probably: undecided\n");
+ else if (avgscore < il->total_no_threshold)
+ printf("ildetect: Content is probably: PROGRESSIVE\n");
+ else if (avgscore > il->total_yes_threshold && avgjumps < 0)
+ printf("ildetect: Content is probably: INTERLACED (possibly telecined)\n");
+ else if (avgjumps > il->tc_threshold)
+ printf("ildetect: Content is probably: TELECINED\n");
+ else if (avgscore > il->total_yes_threshold)
+ printf("ildetect: Content is probably: INTERLACED\n");
+ else
+ printf("ildetect: Content is probably: unknown\n");
+
+ free(ctx->priv);
+}
+
+int vf_dlopen_getcontext(struct vf_dlopen_context *ctx, int argc, const char **argv)
+{
+ VF_DLOPEN_CHECK_VERSION(ctx);
+ (void) argc;
+ (void) argv;
+
+ ildetect_data_t *il = malloc(sizeof(ildetect_data_t));
+ memset(il, 0, sizeof(*il));
+
+#define A(i,d) ((argc>(i) && *argv[i]) ? atof(argv[i]) : (d))
+ il->method = A(0, 0);
+ il->combing_threshold = A(1, 1);
+ il->motion_threshold = A(2, 6);
+ il->motion_amount = A(3, 0.1);
+ il->yes_threshold = A(4, 0.1);
+ il->no_threshold = A(5, 0.05);
+ il->total_yes_threshold = A(6, 0.1);
+ il->total_no_threshold = A(7, 0.05);
+ il->tc_threshold = A(8, 0.1);
+ il->decision_threshold = A(9, 0.2);
+ il->tc_decision_threshold = A(10, 0.2);
+
+ static struct vf_dlopen_formatpair map[] = {
+ { "y8", "y8" },
+ { NULL, NULL }
+ };
+ ctx->format_mapping = map;
+ ctx->config = il_config;
+ ctx->put_image = il_put_image;
+ ctx->uninit = il_uninit;
+ ctx->priv = il;
+ return 1;
+}
diff --git a/TOOLS/vf_dlopen/ildetect.sh b/TOOLS/vf_dlopen/ildetect.sh
new file mode 100755
index 0000000000..d5c7549e10
--- /dev/null
+++ b/TOOLS/vf_dlopen/ildetect.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+case "$0" in
+ */*)
+ MYDIR=${0%/*}
+ ;;
+ *)
+ MYDIR=.
+ ;;
+esac
+
+set -e
+
+make -C "$MYDIR"
+
+testfun()
+{
+ ${MPV:-mpv} "$@" \
+ -vf dlopen="$MYDIR/ildetect.so" \
+ -o /dev/null -of rawvideo -ofopts-clr -ovc rawvideo -ovcopts-clr -no-audio \
+ | tee /dev/stderr | grep "^ildetect:"
+}
+
+out=`testfun "$@"`
+case "$out" in
+ *"probably: PROGRESSIVE"*)
+ ${MPV:-mpv} "$@"
+ ;;
+ *"probably: INTERLACED"*)
+ ${MPV:-mpv} "$@" -vf-pre yadif
+ ;;
+ *"probably: TELECINED"*)
+ ${MPV:-mpv} "$@" -vf-pre pullup
+ ;;
+ *)
+ false
+ ;;
+esac
diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c
index 8699013acf..08739b7f4b 100644
--- a/audio/decode/ad_mpg123.c
+++ b/audio/decode/ad_mpg123.c
@@ -46,10 +46,6 @@ LIBAD_EXTERN(mpg123)
/* Switch for updating bitrate info of VBR files. Not essential. */
#define AD_MPG123_MEAN_BITRATE
-/* Funny thing, that. I assume I shall use it for selecting mpg123 channels.
- * Please correct me if I guessed wrong. */
-extern int fakemono;
-
struct ad_mpg123_context {
mpg123_handle *handle;
#ifdef AD_MPG123_MEAN_BITRATE
@@ -67,7 +63,7 @@ struct ad_mpg123_context {
* parameters. */
static int preinit(sh_audio_t *sh)
{
- int err, flag;
+ int err;
struct ad_mpg123_context *con;
/* Assumption: You always call preinit + init + uninit, on every file.
* But you stop at preinit in case it fails.
@@ -83,13 +79,6 @@ static int preinit(sh_audio_t *sh)
if (!con->handle)
goto bad_end;
- /* Guessing here: Default value triggers forced upmix of mono to stereo. */
- flag = fakemono == 0 ? MPG123_FORCE_STEREO :
- fakemono == 1 ? MPG123_MONO_LEFT :
- fakemono == 2 ? MPG123_MONO_RIGHT : 0;
- if (mpg123_param(con->handle, MPG123_ADD_FLAGS, flag, 0.0) != MPG123_OK)
- goto bad_end;
-
/* Basic settings.
* Don't spill messages, enable better resync with non-seekable streams.
* Give both flags individually without error checking to keep going with
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index dc461b81e3..4f2f462b92 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -39,8 +39,6 @@
#include "audio/filter/af.h"
-int fakemono = 0;
-
struct af_cfg af_cfg = {0}; // Configuration for audio filters
static int init_audio_codec(sh_audio_t *sh_audio, const char *decoder)
diff --git a/audio/format.c b/audio/format.c
index 5b1262956c..a65c10472d 100644
--- a/audio/format.c
+++ b/audio/format.c
@@ -110,6 +110,16 @@ static bool af_fmt_valid(int format)
return (format & AF_FORMAT_MASK) == format;
}
+int af_fmt_seconds_to_bytes(int format, float seconds, int channels, int samplerate)
+{
+ int bps = (af_fmt2bits(format) / 8);
+ int framelen = channels * bps;
+ int bytes = seconds * bps * samplerate;
+ if (bytes % framelen)
+ bytes += framelen - (bytes % framelen);
+ return bytes;
+}
+
int af_str2fmt_short(bstr str)
{
if (bstr_startswith0(str, "0x")) {
diff --git a/audio/format.h b/audio/format.h
index 30a4aa1cea..f3aa3d8af0 100644
--- a/audio/format.h
+++ b/