summaryrefslogtreecommitdiff
path: root/src/internal/audio/kitaudio.c
diff options
context:
space:
mode:
authorTuomas Virtanen <katajakasa@gmail.com>2018-06-28 23:36:03 +0300
committerTuomas Virtanen <katajakasa@gmail.com>2018-06-28 23:36:03 +0300
commitfcacb5e5426dfd47add71f0aa75e86b15bddefb3 (patch)
treed417bcc902b19171ec010ab9ee43a9958b59906b /src/internal/audio/kitaudio.c
parent6c378b43d2c61884842bf2b399461d5e0460c3ef (diff)
Code style improvements
Diffstat (limited to 'src/internal/audio/kitaudio.c')
-rw-r--r--src/internal/audio/kitaudio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/internal/audio/kitaudio.c b/src/internal/audio/kitaudio.c
index 02b9787..7a3b0a4 100644
--- a/src/internal/audio/kitaudio.c
+++ b/src/internal/audio/kitaudio.c
@@ -110,9 +110,12 @@ static void dec_decode_audio_cb(Kit_Decoder *dec, AVPacket *in_packet) {
Kit_AudioDecoder *audio_dec = dec->userdata;
int frame_finished;
- int len, len2;
+ int len;
+ int len2;
int dst_linesize;
- int dst_nb_samples, dst_bufsize;
+ int dst_nb_samples;
+ int dst_bufsize;
+ double pts;
unsigned char **dst_data;
// Decode as long as there is data
@@ -151,7 +154,7 @@ static void dec_decode_audio_cb(Kit_Decoder *dec, AVPacket *in_packet) {
_FindAVSampleFormat(dec->output.format), 1);
// Get presentation timestamp
- double pts = av_frame_get_best_effort_timestamp(audio_dec->scratch_frame);
+ pts = av_frame_get_best_effort_timestamp(audio_dec->scratch_frame);
pts *= av_q2d(dec->format_ctx->streams[dec->stream_index]->time_base);
// Lock, write to audio buffer, unlock