diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbcodec/codecs/aac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rbcodec/codecs/aac.c b/lib/rbcodec/codecs/aac.c index c00946f227..b470fd9622 100644 --- a/lib/rbcodec/codecs/aac.c +++ b/lib/rbcodec/codecs/aac.c | |||
@@ -130,9 +130,12 @@ enum codec_status codec_run(void) | |||
130 | 130 | ||
131 | i = 0; | 131 | i = 0; |
132 | 132 | ||
133 | if (file_offset > 0) { | 133 | if (param) { |
134 | elapsed_time = param; | ||
135 | action = CODEC_ACTION_SEEK_TIME; | ||
136 | } else if (file_offset > 0) { | ||
134 | /* Resume the desired (byte) position. Important: When resuming SBR | 137 | /* Resume the desired (byte) position. Important: When resuming SBR |
135 | * upsampling files the resulting sound_samples_done must be expanded | 138 | * upsampling files the resulting sound_samples_done must be expanded |
136 | * by a factor of 2. This is done via using sbr_fac. */ | 139 | * by a factor of 2. This is done via using sbr_fac. */ |
137 | if (m4a_seek_raw(&demux_res, &input_stream, file_offset, | 140 | if (m4a_seek_raw(&demux_res, &input_stream, file_offset, |
138 | &sound_samples_done, (int*) &i)) { | 141 | &sound_samples_done, (int*) &i)) { |
@@ -142,9 +145,6 @@ enum codec_status codec_run(void) | |||
142 | } | 145 | } |
143 | NeAACDecPostSeekReset(decoder, i); | 146 | NeAACDecPostSeekReset(decoder, i); |
144 | elapsed_time = sound_samples_done * 1000LL / ci->id3->frequency; | 147 | elapsed_time = sound_samples_done * 1000LL / ci->id3->frequency; |
145 | } else if (param) { | ||
146 | elapsed_time = param; | ||
147 | action = CODEC_ACTION_SEEK_TIME; | ||
148 | } else { | 148 | } else { |
149 | elapsed_time = 0; | 149 | elapsed_time = 0; |
150 | sound_samples_done = 0; | 150 | sound_samples_done = 0; |