Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
036079ce
Commit
036079ce
authored
Apr 03, 2015
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/mpeg: Support alaw in Hikvision CCTV recordings.
Fixes a sample from ticket #4182.
parent
f8413f74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
mpeg.c
libavformat/mpeg.c
+5
-1
No files found.
libavformat/mpeg.c
View file @
036079ce
...
@@ -547,6 +547,9 @@ redo:
...
@@ -547,6 +547,9 @@ redo:
codec_id
=
AV_CODEC_ID_ADPCM_ADX
;
codec_id
=
AV_CODEC_ID_ADPCM_ADX
;
// Auto-detect AC-3
// Auto-detect AC-3
request_probe
=
50
;
request_probe
=
50
;
}
else
if
(
m
->
imkh_cctv
&&
startcode
==
0x1c0
)
{
codec_id
=
AV_CODEC_ID_PCM_ALAW
;
request_probe
=
50
;
}
else
{
}
else
{
codec_id
=
AV_CODEC_ID_MP2
;
codec_id
=
AV_CODEC_ID_MP2
;
if
(
m
->
imkh_cctv
)
if
(
m
->
imkh_cctv
)
...
@@ -593,7 +596,8 @@ skip:
...
@@ -593,7 +596,8 @@ skip:
st
->
id
=
startcode
;
st
->
id
=
startcode
;
st
->
codec
->
codec_type
=
type
;
st
->
codec
->
codec_type
=
type
;
st
->
codec
->
codec_id
=
codec_id
;
st
->
codec
->
codec_id
=
codec_id
;
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_PCM_MULAW
)
{
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_PCM_MULAW
||
st
->
codec
->
codec_id
==
AV_CODEC_ID_PCM_ALAW
)
{
st
->
codec
->
channels
=
1
;
st
->
codec
->
channels
=
1
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_MONO
;
st
->
codec
->
channel_layout
=
AV_CH_LAYOUT_MONO
;
st
->
codec
->
sample_rate
=
8000
;
st
->
codec
->
sample_rate
=
8000
;
...
...
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