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
d906f49a
Commit
d906f49a
authored
Sep 14, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rawdec: g722 is always 1 channel/16kHz
parent
3a78fb57
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
rawdec.c
libavformat/rawdec.c
+5
-4
fate2.mak
tests/fate2.mak
+1
-1
No files found.
libavformat/rawdec.c
View file @
d906f49a
...
@@ -51,9 +51,12 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -51,9 +51,12 @@ int ff_raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
st
->
codec
->
channels
=
1
;
st
->
codec
->
channels
=
1
;
if
(
s1
->
sample_rate
)
if
(
id
==
CODEC_ID_ADPCM_G722
)
st
->
codec
->
sample_rate
=
16000
;
if
(
s1
&&
s1
->
sample_rate
)
st
->
codec
->
sample_rate
=
s1
->
sample_rate
;
st
->
codec
->
sample_rate
=
s1
->
sample_rate
;
if
(
s1
->
channels
)
if
(
s1
&&
s1
->
channels
)
st
->
codec
->
channels
=
s1
->
channels
;
st
->
codec
->
channels
=
s1
->
channels
;
st
->
codec
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
st
->
codec
->
codec_id
);
st
->
codec
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
st
->
codec
->
codec_id
);
...
@@ -199,13 +202,11 @@ const AVClass ff_rawvideo_demuxer_class = {
...
@@ -199,13 +202,11 @@ const AVClass ff_rawvideo_demuxer_class = {
AVInputFormat
ff_g722_demuxer
=
{
AVInputFormat
ff_g722_demuxer
=
{
.
name
=
"g722"
,
.
name
=
"g722"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"raw G.722"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"raw G.722"
),
.
priv_data_size
=
sizeof
(
RawAudioDemuxerContext
),
.
read_header
=
ff_raw_read_header
,
.
read_header
=
ff_raw_read_header
,
.
read_packet
=
ff_raw_read_partial_packet
,
.
read_packet
=
ff_raw_read_partial_packet
,
.
flags
=
AVFMT_GENERIC_INDEX
,
.
flags
=
AVFMT_GENERIC_INDEX
,
.
extensions
=
"g722,722"
,
.
extensions
=
"g722,722"
,
.
value
=
CODEC_ID_ADPCM_G722
,
.
value
=
CODEC_ID_ADPCM_G722
,
.
priv_class
=
&
ff_rawaudio_demuxer_class
,
};
};
#endif
#endif
...
...
tests/fate2.mak
View file @
d906f49a
...
@@ -131,7 +131,7 @@ FATE_TESTS += fate-gsm-ms
...
@@ -131,7 +131,7 @@ FATE_TESTS += fate-gsm-ms
fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav
fate-gsm-ms: CMD = framecrc -i $(SAMPLES)/gsm/ciao.wav
FATE_TESTS += fate-g722dec-1
FATE_TESTS += fate-g722dec-1
fate-g722dec-1: CMD = framecrc -
ar 16000 -
i $(SAMPLES)/g722/conf-adminmenu-162.g722
fate-g722dec-1: CMD = framecrc -i $(SAMPLES)/g722/conf-adminmenu-162.g722
FATE_TESTS += fate-msmpeg4v1
FATE_TESTS += fate-msmpeg4v1
fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an
fate-msmpeg4v1: CMD = framecrc -flags +bitexact -dct fastint -idct simple -i $(SAMPLES)/msmpeg4v1/mpg4.avi -an
...
...
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