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
b8afbbca
Commit
b8afbbca
authored
Mar 04, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: factor out determinable_frame_size()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
15c6be8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
utils.c
libavformat/utils.c
+12
-6
No files found.
libavformat/utils.c
View file @
b8afbbca
...
...
@@ -752,6 +752,17 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
/**********************************************************/
static
int
determinable_frame_size
(
AVCodecContext
*
avctx
)
{
if
(
avctx
->
codec_id
==
CODEC_ID_AAC
||
avctx
->
codec_id
==
CODEC_ID_MP1
||
avctx
->
codec_id
==
CODEC_ID_MP2
||
avctx
->
codec_id
==
CODEC_ID_MP3
||
avctx
->
codec_id
==
CODEC_ID_CELT
)
return
1
;
return
0
;
}
/**
* Get the number of samples of an audio frame. Return -1 on error.
*/
...
...
@@ -2101,12 +2112,7 @@ static int has_codec_parameters(AVCodecContext *avctx)
switch
(
avctx
->
codec_type
)
{
case
AVMEDIA_TYPE_AUDIO
:
val
=
avctx
->
sample_rate
&&
avctx
->
channels
&&
avctx
->
sample_fmt
!=
AV_SAMPLE_FMT_NONE
;
if
(
!
avctx
->
frame_size
&&
(
avctx
->
codec_id
==
CODEC_ID_AAC
||
avctx
->
codec_id
==
CODEC_ID_MP1
||
avctx
->
codec_id
==
CODEC_ID_MP2
||
avctx
->
codec_id
==
CODEC_ID_MP3
||
avctx
->
codec_id
==
CODEC_ID_CELT
))
if
(
!
avctx
->
frame_size
&&
determinable_frame_size
(
avctx
))
return
0
;
break
;
case
AVMEDIA_TYPE_VIDEO
:
...
...
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