diff options
author | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-08 18:31:04 +0000 |
---|---|---|
committer | uau <uau@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-08 18:31:04 +0000 |
commit | 0f6d5e4fd967468f813daf359123b2047f9dc167 (patch) | |
tree | a12700d1d1863694b0789760ed8b43843c130c79 | |
parent | d9a87e081ec260bcbd626ac990f2685a3b0fcbc2 (diff) | |
download | mpv-0f6d5e4fd967468f813daf359123b2047f9dc167.tar.bz2 mpv-0f6d5e4fd967468f813daf359123b2047f9dc167.tar.xz |
Change value used to indicate "unknown audio format" from 0 to -1.
0 collided with a valid format value.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20787 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libaf/af.c | 6 | ||||
-rw-r--r-- | libaf/af_format.h | 2 | ||||
-rw-r--r-- | mplayer.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/libaf/af.c b/libaf/af.c index ba5d59da14..e76af0821e 100644 --- a/libaf/af.c +++ b/libaf/af.c @@ -443,7 +443,8 @@ int af_init(af_stream_t* s) } // Check output format fix if not OK - if(s->output.format && s->last->data->format != s->output.format){ + if(s->output.format != AF_FORMAT_UNKNOWN && + s->last->data->format != s->output.format){ if(strcmp(s->last->info->name,"format")) af = af_append(s,s->last,"format"); else @@ -460,7 +461,8 @@ int af_init(af_stream_t* s) if(AF_OK != af_reinit(s,s->first)) return -1; - if (!s->output.format) s->output.format = s->last->data->format; + if (s->output.format == AF_FORMAT_UNKNOWN) + s->output.format = s->last->data->format; if (!s->output.nch) s->output.nch = s->last->data->nch; if (!s->output.rate) s->output.rate = s->last->data->rate; if((s->last->data->format != s->output.format) || diff --git a/libaf/af_format.h b/libaf/af_format.h index dffd87e85e..8963886b41 100644 --- a/libaf/af_format.h +++ b/libaf/af_format.h @@ -84,6 +84,8 @@ #define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT_LE #endif +#define AF_FORMAT_UNKNOWN (-1) + extern int af_str2fmt(const char *str); extern int af_str2fmt_short(const char *str); extern int af_fmt2bits(int format); @@ -311,7 +311,7 @@ static int softsleep=0; float force_fps=0; static int force_srate=0; -static int audio_output_format=0; +static int audio_output_format=-1; // AF_FORMAT_UNKNOWN int frame_dropping=0; // option 0=no drop 1= drop vo 2= drop decode static int play_n_frames=-1; static int play_n_frames_mf=-1; |