Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
3ab1e5a4
Commit
3ab1e5a4
authored
9 years ago
by
Nicolas George
Browse files
Options
Downloads
Patches
Plain Diff
lavf: add FFERROR_REDO to let demuxers return no packet.
parent
64f7db55
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavformat/internal.h
+6
-0
6 additions, 0 deletions
libavformat/internal.h
libavformat/utils.c
+5
-0
5 additions, 0 deletions
libavformat/utils.c
with
11 additions
and
0 deletions
libavformat/internal.h
+
6
−
0
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 */
This diff is collapsed.
Click to expand it.
libavformat/utils.c
+
5
−
0
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
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment