Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
36def779
Commit
36def779
authored
May 06, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed (partially) parsing of E-AC3 not using 1536 samples per frame.
parent
029138a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
modules/codec/a52.c
modules/codec/a52.c
+4
-4
modules/codec/a52.h
modules/codec/a52.h
+4
-0
No files found.
modules/codec/a52.c
View file @
36def779
...
...
@@ -359,7 +359,7 @@ static uint8_t *GetOutBuffer( decoder_t *p_dec, void **pp_out_buffer )
p_dec
->
fmt_out
.
audio
.
i_channels
=
p_sys
->
frame
.
i_channels
;
if
(
p_dec
->
fmt_out
.
audio
.
i_bytes_per_frame
<
p_sys
->
frame
.
i_size
)
p_dec
->
fmt_out
.
audio
.
i_bytes_per_frame
=
p_sys
->
frame
.
i_size
;
p_dec
->
fmt_out
.
audio
.
i_frame_length
=
A52_FRAME_NB
;
p_dec
->
fmt_out
.
audio
.
i_frame_length
=
p_sys
->
frame
.
i_samples
;
p_dec
->
fmt_out
.
audio
.
i_original_channels
=
p_sys
->
frame
.
i_channels_conf
;
p_dec
->
fmt_out
.
audio
.
i_physical_channels
=
...
...
@@ -391,11 +391,11 @@ static aout_buffer_t *GetAoutBuffer( decoder_t *p_dec )
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
aout_buffer_t
*
p_buf
;
p_buf
=
decoder_NewAudioBuffer
(
p_dec
,
A52_FRAME_NB
);
p_buf
=
decoder_NewAudioBuffer
(
p_dec
,
p_sys
->
frame
.
i_samples
);
if
(
p_buf
==
NULL
)
return
NULL
;
p_buf
->
start_date
=
aout_DateGet
(
&
p_sys
->
end_date
);
p_buf
->
end_date
=
aout_DateIncrement
(
&
p_sys
->
end_date
,
A52_FRAME_NB
);
p_buf
->
end_date
=
aout_DateIncrement
(
&
p_sys
->
end_date
,
p_sys
->
frame
.
i_samples
);
return
p_buf
;
}
...
...
@@ -414,7 +414,7 @@ static block_t *GetSoutBuffer( decoder_t *p_dec )
p_block
->
i_pts
=
p_block
->
i_dts
=
aout_DateGet
(
&
p_sys
->
end_date
);
p_block
->
i_length
=
aout_DateIncrement
(
&
p_sys
->
end_date
,
A52_FRAME_NB
)
-
p_block
->
i_pts
;
aout_DateIncrement
(
&
p_sys
->
end_date
,
p_sys
->
frame
.
i_samples
)
-
p_block
->
i_pts
;
return
p_block
;
}
...
...
modules/codec/a52.h
View file @
36def779
...
...
@@ -54,6 +54,7 @@ typedef struct
unsigned
int
i_bitrate
;
unsigned
int
i_size
;
unsigned
int
i_samples
;
}
vlc_a52_header_t
;
...
...
@@ -122,6 +123,8 @@ static inline int vlc_a52_header_ParseAc3( vlc_a52_header_t *p_header,
default:
return
VLC_EGENERIC
;
}
p_header
->
i_samples
=
6
*
256
;
p_header
->
b_eac3
=
false
;
return
VLC_SUCCESS
;
}
...
...
@@ -170,6 +173,7 @@ static inline int vlc_a52_header_ParseEac3( vlc_a52_header_t *p_header,
p_header
->
i_channels
=
p_acmod
[
i_acmod
].
i_count
+
i_lfeon
;
p_header
->
i_channels_conf
=
p_acmod
[
i_acmod
].
i_configuration
|
(
i_lfeon
?
AOUT_CHAN_LFE
:
0
);
p_header
->
i_bitrate
=
8
*
p_header
->
i_size
*
(
p_header
->
i_rate
)
/
(
i_numblkscod
*
256
);
p_header
->
i_samples
=
i_numblkscod
*
256
;
p_header
->
b_eac3
=
true
;
return
VLC_SUCCESS
;
...
...
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