Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
2e8dcde1
Commit
2e8dcde1
authored
Oct 04, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: autodetect realtime streams and enable infbuf
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cb3fd029
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
ffplay.c
ffplay.c
+19
-0
No files found.
ffplay.c
View file @
2e8dcde1
...
...
@@ -2363,6 +2363,22 @@ static int decode_interrupt_cb(void *ctx)
return
is
->
abort_request
;
}
static
int
is_realtime
(
AVFormatContext
*
s
)
{
if
(
!
strcmp
(
s
->
iformat
->
name
,
"rtp"
)
||
!
strcmp
(
s
->
iformat
->
name
,
"rtsp"
)
||
!
strcmp
(
s
->
iformat
->
name
,
"sdp"
)
)
return
1
;
if
(
s
->
pb
&&
(
!
strncmp
(
s
->
filename
,
"rtp:"
,
4
)
||
!
strncmp
(
s
->
filename
,
"udp:"
,
4
)
)
)
return
1
;
return
0
;
}
/* this thread gets the stream from the disk or the network */
static
int
read_thread
(
void
*
arg
)
{
...
...
@@ -2485,6 +2501,9 @@ static int read_thread(void *arg)
goto
fail
;
}
if
(
infinite_buffer
<
0
&&
is_realtime
(
ic
))
infinite_buffer
=
1
;
for
(;;)
{
if
(
is
->
abort_request
)
break
;
...
...
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