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
a959f0ea
Commit
a959f0ea
authored
May 15, 2006
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pcm_s24be demuxing, simplify
Originally committed as revision 5381 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
fce9551e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
20 deletions
+3
-20
aiff.c
libavformat/aiff.c
+3
-20
No files found.
libavformat/aiff.c
View file @
a959f0ea
...
...
@@ -399,37 +399,20 @@ got_sound:
static
int
aiff_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
offset_t
pos
;
int
res
,
size
;
AVStream
*
st
=
s
->
streams
[
0
]
;
int
res
;
/* End of stream may be reached */
if
(
url_feof
(
&
s
->
pb
))
return
AVERROR_IO
;
/* Need to know if reached the end sound data */
size
=
MAX_SIZE
;
if
(
s
->
file_size
)
{
pos
=
url_ftell
(
&
s
->
pb
)
-
s
->
file_size
;
if
(
pos
>=
s
->
file_size
)
size
=
0
;
else
if
(
pos
+
MAX_SIZE
>=
s
->
file_size
)
size
=
s
->
file_size
-
pos
;
}
/* Now for that packet */
res
=
av_get_packet
(
&
s
->
pb
,
pkt
,
MAX_SIZE
);
res
=
av_get_packet
(
&
s
->
pb
,
pkt
,
(
MAX_SIZE
/
st
->
codec
->
block_align
)
*
st
->
codec
->
block_align
);
if
(
res
<
0
)
return
res
;
/* Only one stream in an AIFF file */
pkt
->
stream_index
=
0
;
/* Finaly fix the read to a block */
if
(
size
<=
res
)
pkt
->
size
=
size
-
(
size
%
s
->
streams
[
0
]
->
codec
->
block_align
);
else
pkt
->
size
=
res
-
(
res
%
s
->
streams
[
0
]
->
codec
->
block_align
);
return
0
;
}
...
...
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