Commit 8776f3d2 authored by Stefano Sabatini's avatar Stefano Sabatini

ffplay: remove audio_write_get_buf_size() forward declaration

Move up the definition of audio_write_get_buf_size(), so that it is
defined before it is used. Simplify.
parent a6f395d6
...@@ -218,7 +218,6 @@ typedef struct VideoState { ...@@ -218,7 +218,6 @@ typedef struct VideoState {
} VideoState; } VideoState;
static void show_help(void); static void show_help(void);
static int audio_write_get_buf_size(VideoState *is);
/* options specified by the user */ /* options specified by the user */
static AVInputFormat *file_iformat; static AVInputFormat *file_iformat;
...@@ -763,6 +762,13 @@ static void video_image_display(VideoState *is) ...@@ -763,6 +762,13 @@ static void video_image_display(VideoState *is)
} }
} }
/* get the current audio output buffer size, in samples. With SDL, we
cannot have a precise information */
static int audio_write_get_buf_size(VideoState *is)
{
return is->audio_buf_size - is->audio_buf_index;
}
static inline int compute_mod(int a, int b) static inline int compute_mod(int a, int b)
{ {
return a < 0 ? a%b + b : a%b; return a < 0 ? a%b + b : a%b;
...@@ -2141,14 +2147,6 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr) ...@@ -2141,14 +2147,6 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
} }
} }
/* get the current audio output buffer size, in samples. With SDL, we
cannot have a precise information */
static int audio_write_get_buf_size(VideoState *is)
{
return is->audio_buf_size - is->audio_buf_index;
}
/* prepare a new audio buffer */ /* prepare a new audio buffer */
static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) static void sdl_audio_callback(void *opaque, Uint8 *stream, int len)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment