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
2e93e3aa
Commit
2e93e3aa
authored
Sep 15, 2001
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed raw read for eof
Originally committed as revision 121 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
9dbf9389
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
raw.c
libav/raw.c
+10
-12
No files found.
libav/raw.c
View file @
2e93e3aa
...
...
@@ -84,27 +84,25 @@ static int raw_read_header(AVFormatContext *s,
return
0
;
}
#define
MIN
_SIZE 1024
#define
RAW_PACKET
_SIZE 1024
int
raw_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
int
packet_size
,
n
,
ret
;
int
ret
;
if
(
url_feof
(
&
s
->
pb
))
return
-
EIO
;
packet_size
=
url_get_packet_size
(
&
s
->
pb
);
n
=
MIN_SIZE
/
packet_size
;
if
(
n
<=
0
)
n
=
1
;
if
(
av_new_packet
(
pkt
,
n
*
packet_size
)
<
0
)
if
(
av_new_packet
(
pkt
,
RAW_PACKET_SIZE
)
<
0
)
return
-
EIO
;
pkt
->
stream_index
=
0
;
ret
=
get_buffer
(
&
s
->
pb
,
pkt
->
data
,
pkt
->
size
);
if
(
ret
<
0
)
ret
=
get_buffer
(
&
s
->
pb
,
pkt
->
data
,
RAW_PACKET_SIZE
);
if
(
ret
<
=
0
)
{
av_free_packet
(
pkt
);
return
-
EIO
;
}
/* note: we need to modify the packet size here to handle the last
packet */
pkt
->
size
=
ret
;
return
ret
;
}
...
...
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