Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
11404b5d
Commit
11404b5d
authored
Nov 04, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp4: initialize audio_format before decoder_initialized()
Removed the duplicate audio_format initialization.
parent
290347c4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
mp4_plugin.c
src/decoder/mp4_plugin.c
+5
-6
No files found.
src/decoder/mp4_plugin.c
View file @
11404b5d
...
...
@@ -109,7 +109,6 @@ mp4_decode(struct decoder *mpd_decoder, struct input_stream *input_stream)
faacDecHandle
decoder
;
faacDecFrameInfo
frame_info
;
faacDecConfigurationPtr
config
;
struct
audio_format
audio_format
;
unsigned
char
*
mp4_buffer
;
unsigned
int
mp4_buffer_size
;
uint32_t
sample_rate
;
...
...
@@ -155,8 +154,6 @@ mp4_decode(struct decoder *mpd_decoder, struct input_stream *input_stream)
#endif
faacDecSetConfiguration
(
decoder
,
config
);
audio_format
.
bits
=
16
;
mp4_buffer
=
NULL
;
mp4_buffer_size
=
0
;
mp4ff_get_decoder_config
(
mp4fh
,
track
,
&
mp4_buffer
,
&
mp4_buffer_size
);
...
...
@@ -169,8 +166,6 @@ mp4_decode(struct decoder *mpd_decoder, struct input_stream *input_stream)
return
false
;
}
audio_format
.
sample_rate
=
sample_rate
;
audio_format
.
channels
=
channels
;
file_time
=
mp4ff_get_track_duration_use_offsets
(
mp4fh
,
track
);
scale
=
mp4ff_time_scale
(
mp4fh
,
track
);
...
...
@@ -259,12 +254,16 @@ mp4_decode(struct decoder *mpd_decoder, struct input_stream *input_stream)
}
if
(
!
initialized
)
{
struct
audio_format
audio_format
=
{
.
bits
=
16
,
.
channels
=
frame_info
.
channels
,
};
channels
=
frame_info
.
channels
;
#ifdef HAVE_FAACDECFRAMEINFO_SAMPLERATE
scale
=
frame_info
.
samplerate
;
#endif
audio_format
.
sample_rate
=
scale
;
audio_format
.
channels
=
frame_info
.
channels
;
decoder_initialized
(
mpd_decoder
,
&
audio_format
,
input_stream
->
seekable
,
total_time
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment