mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
ffplay: remove pts_ptr argument from audio_decode_frame()
The argument is no longer used outside the function. Simplify.
This commit is contained in:
parent
cb573f7fbc
commit
6e32b377bb
8
ffplay.c
8
ffplay.c
@ -2089,7 +2089,7 @@ static int synchronize_audio(VideoState *is, int nb_samples)
|
|||||||
* stored in is->audio_buf, with size in bytes given by the return
|
* stored in is->audio_buf, with size in bytes given by the return
|
||||||
* value.
|
* value.
|
||||||
*/
|
*/
|
||||||
static int audio_decode_frame(VideoState *is, double *pts_ptr)
|
static int audio_decode_frame(VideoState *is)
|
||||||
{
|
{
|
||||||
AVPacket *pkt_temp = &is->audio_pkt_temp;
|
AVPacket *pkt_temp = &is->audio_pkt_temp;
|
||||||
AVPacket *pkt = &is->audio_pkt;
|
AVPacket *pkt = &is->audio_pkt;
|
||||||
@ -2097,7 +2097,7 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
|
|||||||
int len1, len2, data_size, resampled_data_size;
|
int len1, len2, data_size, resampled_data_size;
|
||||||
int64_t dec_channel_layout;
|
int64_t dec_channel_layout;
|
||||||
int got_frame;
|
int got_frame;
|
||||||
double pts;
|
av_unused double pts;
|
||||||
int new_packet = 0;
|
int new_packet = 0;
|
||||||
int flush_complete = 0;
|
int flush_complete = 0;
|
||||||
int wanted_nb_samples;
|
int wanted_nb_samples;
|
||||||
@ -2196,7 +2196,6 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
|
|||||||
|
|
||||||
/* if no pts, then compute it */
|
/* if no pts, then compute it */
|
||||||
pts = is->audio_clock;
|
pts = is->audio_clock;
|
||||||
*pts_ptr = pts;
|
|
||||||
is->audio_clock += (double)data_size /
|
is->audio_clock += (double)data_size /
|
||||||
(is->frame->channels * is->frame->sample_rate * av_get_bytes_per_sample(is->frame->format));
|
(is->frame->channels * is->frame->sample_rate * av_get_bytes_per_sample(is->frame->format));
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -2248,13 +2247,12 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len)
|
|||||||
int audio_size, len1;
|
int audio_size, len1;
|
||||||
int bytes_per_sec;
|
int bytes_per_sec;
|
||||||
int frame_size = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, 1, is->audio_tgt.fmt, 1);
|
int frame_size = av_samples_get_buffer_size(NULL, is->audio_tgt.channels, 1, is->audio_tgt.fmt, 1);
|
||||||
double pts;
|
|
||||||
|
|
||||||
audio_callback_time = av_gettime();
|
audio_callback_time = av_gettime();
|
||||||
|
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
if (is->audio_buf_index >= is->audio_buf_size) {
|
if (is->audio_buf_index >= is->audio_buf_size) {
|
||||||
audio_size = audio_decode_frame(is, &pts);
|
audio_size = audio_decode_frame(is);
|
||||||
if (audio_size < 0) {
|
if (audio_size < 0) {
|
||||||
/* if error, just output silence */
|
/* if error, just output silence */
|
||||||
is->audio_buf = is->silence_buf;
|
is->audio_buf = is->silence_buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user