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
237a855c
Commit
237a855c
authored
Feb 27, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov: do not set AVCodecContext.frame_size
It is not necessary.
parent
97272642
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
13 deletions
+0
-13
mov.c
libavformat/mov.c
+0
-13
No files found.
libavformat/mov.c
View file @
237a855c
...
@@ -1406,20 +1406,16 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
...
@@ -1406,20 +1406,16 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
// force sample rate for qcelp when not stored in mov
// force sample rate for qcelp when not stored in mov
if
(
st
->
codec
->
codec_tag
!=
MKTAG
(
'Q'
,
'c'
,
'l'
,
'p'
))
if
(
st
->
codec
->
codec_tag
!=
MKTAG
(
'Q'
,
'c'
,
'l'
,
'p'
))
st
->
codec
->
sample_rate
=
8000
;
st
->
codec
->
sample_rate
=
8000
;
st
->
codec
->
frame_size
=
160
;
st
->
codec
->
channels
=
1
;
/* really needed */
st
->
codec
->
channels
=
1
;
/* really needed */
break
;
break
;
case
CODEC_ID_AMR_NB
:
case
CODEC_ID_AMR_NB
:
st
->
codec
->
channels
=
1
;
/* really needed */
st
->
codec
->
channels
=
1
;
/* really needed */
/* force sample rate for amr, stsd in 3gp does not store sample rate */
/* force sample rate for amr, stsd in 3gp does not store sample rate */
st
->
codec
->
sample_rate
=
8000
;
st
->
codec
->
sample_rate
=
8000
;
/* force frame_size, too, samples_per_frame isn't always set properly */
st
->
codec
->
frame_size
=
160
;
break
;
break
;
case
CODEC_ID_AMR_WB
:
case
CODEC_ID_AMR_WB
:
st
->
codec
->
channels
=
1
;
st
->
codec
->
channels
=
1
;
st
->
codec
->
sample_rate
=
16000
;
st
->
codec
->
sample_rate
=
16000
;
st
->
codec
->
frame_size
=
320
;
break
;
break
;
case
CODEC_ID_MP2
:
case
CODEC_ID_MP2
:
case
CODEC_ID_MP3
:
case
CODEC_ID_MP3
:
...
@@ -1429,12 +1425,10 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
...
@@ -1429,12 +1425,10 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
case
CODEC_ID_GSM
:
case
CODEC_ID_GSM
:
case
CODEC_ID_ADPCM_MS
:
case
CODEC_ID_ADPCM_MS
:
case
CODEC_ID_ADPCM_IMA_WAV
:
case
CODEC_ID_ADPCM_IMA_WAV
:
st
->
codec
->
frame_size
=
sc
->
samples_per_frame
;
st
->
codec
->
block_align
=
sc
->
bytes_per_frame
;
st
->
codec
->
block_align
=
sc
->
bytes_per_frame
;
break
;
break
;
case
CODEC_ID_ALAC
:
case
CODEC_ID_ALAC
:
if
(
st
->
codec
->
extradata_size
==
36
)
{
if
(
st
->
codec
->
extradata_size
==
36
)
{
st
->
codec
->
frame_size
=
AV_RB32
(
st
->
codec
->
extradata
+
12
);
st
->
codec
->
channels
=
AV_RB8
(
st
->
codec
->
extradata
+
21
);
st
->
codec
->
channels
=
AV_RB8
(
st
->
codec
->
extradata
+
21
);
st
->
codec
->
sample_rate
=
AV_RB32
(
st
->
codec
->
extradata
+
32
);
st
->
codec
->
sample_rate
=
AV_RB32
(
st
->
codec
->
extradata
+
32
);
}
}
...
@@ -1984,13 +1978,6 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
...
@@ -1984,13 +1978,6 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avpriv_set_pts_info
(
st
,
64
,
1
,
sc
->
time_scale
);
avpriv_set_pts_info
(
st
,
64
,
1
,
sc
->
time_scale
);
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
&&
!
st
->
codec
->
frame_size
&&
sc
->
stts_count
==
1
)
{
st
->
codec
->
frame_size
=
av_rescale
(
sc
->
stts_data
[
0
].
duration
,
st
->
codec
->
sample_rate
,
sc
->
time_scale
);
av_dlog
(
c
->
fc
,
"frame size %d
\n
"
,
st
->
codec
->
frame_size
);
}
mov_build_index
(
c
,
st
);
mov_build_index
(
c
,
st
);
if
(
sc
->
dref_id
-
1
<
sc
->
drefs_count
&&
sc
->
drefs
[
sc
->
dref_id
-
1
].
path
)
{
if
(
sc
->
dref_id
-
1
<
sc
->
drefs_count
&&
sc
->
drefs
[
sc
->
dref_id
-
1
].
path
)
{
...
...
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