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
df84ac2e
Commit
df84ac2e
authored
Aug 14, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack overflow
Originally committed as revision 3389 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b6c50eb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ffmpeg.c
ffmpeg.c
+3
-3
No files found.
ffmpeg.c
View file @
df84ac2e
...
...
@@ -1078,7 +1078,6 @@ static int output_packet(AVInputStream *ist, int ist_index,
uint8_t
*
data_buf
;
int
data_size
,
got_picture
;
AVFrame
picture
;
short
samples
[
pkt
&&
pkt
->
size
>
AVCODEC_MAX_AUDIO_FRAME_SIZE
/
2
?
pkt
->
size
:
AVCODEC_MAX_AUDIO_FRAME_SIZE
/
2
];
void
*
buffer_to_free
;
if
(
pkt
&&
pkt
->
dts
!=
AV_NOPTS_VALUE
)
{
//FIXME seems redundant, as libavformat does this too
...
...
@@ -1103,9 +1102,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
data_size
=
0
;
if
(
ist
->
decoding_needed
)
{
switch
(
ist
->
st
->
codec
.
codec_type
)
{
case
CODEC_TYPE_AUDIO
:
case
CODEC_TYPE_AUDIO
:
{
/* XXX: could avoid copy if PCM 16 bits with same
endianness as CPU */
short
samples
[
pkt
&&
pkt
->
size
>
AVCODEC_MAX_AUDIO_FRAME_SIZE
/
2
?
pkt
->
size
:
AVCODEC_MAX_AUDIO_FRAME_SIZE
/
2
];
ret
=
avcodec_decode_audio
(
&
ist
->
st
->
codec
,
samples
,
&
data_size
,
ptr
,
len
);
if
(
ret
<
0
)
...
...
@@ -1121,7 +1121,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
data_buf
=
(
uint8_t
*
)
samples
;
ist
->
next_pts
+=
((
int64_t
)
AV_TIME_BASE
/
2
*
data_size
)
/
(
ist
->
st
->
codec
.
sample_rate
*
ist
->
st
->
codec
.
channels
);
break
;
break
;
}
case
CODEC_TYPE_VIDEO
:
data_size
=
(
ist
->
st
->
codec
.
width
*
ist
->
st
->
codec
.
height
*
3
)
/
2
;
/* XXX: allocate picture correctly */
...
...
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