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
3ab1e5a4
Commit
3ab1e5a4
authored
Nov 27, 2015
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: add FFERROR_REDO to let demuxers return no packet.
parent
64f7db55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
internal.h
libavformat/internal.h
+6
-0
utils.c
libavformat/utils.c
+5
-0
No files found.
libavformat/internal.h
View file @
3ab1e5a4
...
...
@@ -516,4 +516,10 @@ int ff_copy_whitelists(AVFormatContext *dst, AVFormatContext *src);
int
ffio_open2_wrapper
(
struct
AVFormatContext
*
s
,
AVIOContext
**
pb
,
const
char
*
url
,
int
flags
,
const
AVIOInterruptCB
*
int_cb
,
AVDictionary
**
options
);
/**
* Returned by demuxers to indicate that data was consumed but discarded
* (ignored streams or junk data). The framework will re-call the demuxer.
*/
#define FFERROR_REDO FFERRTAG('R','E','D','O')
#endif
/* AVFORMAT_INTERNAL_H */
libavformat/utils.c
View file @
3ab1e5a4
...
...
@@ -680,6 +680,11 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
av_init_packet
(
pkt
);
ret
=
s
->
iformat
->
read_packet
(
s
,
pkt
);
if
(
ret
<
0
)
{
/* Some demuxers return FFERROR_REDO when they consume
data and discard it (ignored streams, junk, extradata).
We must re-call the demuxer to get the real packet. */
if
(
ret
==
FFERROR_REDO
)
continue
;
if
(
!
pktl
||
ret
==
AVERROR
(
EAGAIN
))
return
ret
;
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
...
...
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