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
a45ec414
Commit
a45ec414
authored
Jun 04, 2007
by
Benoit Fouet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indentation
Originally committed as revision 9197 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ddcf4b5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
mpegts.c
libavformat/mpegts.c
+36
-36
No files found.
libavformat/mpegts.c
View file @
a45ec414
...
...
@@ -1213,56 +1213,56 @@ static int mpegts_read_header(AVFormatContext *s,
if
(
s
->
iformat
==
&
mpegts_demuxer
)
{
/* normal demux */
/* first do a scaning to get all the services */
url_fseek
(
pb
,
pos
,
SEEK_SET
);
mpegts_scan_sdt
(
ts
);
handle_packets
(
ts
,
s
->
probesize
);
/* first do a scaning to get all the services */
url_fseek
(
pb
,
pos
,
SEEK_SET
);
mpegts_scan_sdt
(
ts
);
if
(
ts
->
nb_services
<=
0
)
{
/* no SDT found, we try to look at the PAT */
handle_packets
(
ts
,
s
->
probesize
);
/* First remove the SDT filters from each PID */
int
i
;
for
(
i
=
0
;
i
<
NB_PID_MAX
;
i
++
)
{
if
(
ts
->
pids
[
i
])
mpegts_close_filter
(
ts
,
ts
->
pids
[
i
]);
}
url_fseek
(
pb
,
pos
,
SEEK_SET
);
mpegts_scan_pat
(
ts
);
if
(
ts
->
nb_services
<=
0
)
{
/* no SDT found, we try to look at the PAT */
handle_packets
(
ts
,
s
->
probesize
);
/* First remove the SDT filters from each PID */
int
i
;
for
(
i
=
0
;
i
<
NB_PID_MAX
;
i
++
)
{
if
(
ts
->
pids
[
i
])
mpegts_close_filter
(
ts
,
ts
->
pids
[
i
]);
}
url_fseek
(
pb
,
pos
,
SEEK_SET
);
mpegts_scan_pat
(
ts
);
if
(
ts
->
nb_services
<=
0
)
{
/* raw transport stream */
ts
->
auto_guess
=
1
;
s
->
ctx_flags
|=
AVFMTCTX_NOHEADER
;
goto
do_pcr
;
}
handle_packets
(
ts
,
s
->
probesize
);
}
if
(
ts
->
nb_services
<=
0
)
{
/* raw transport stream */
ts
->
auto_guess
=
1
;
s
->
ctx_flags
|=
AVFMTCTX_NOHEADER
;
goto
do_pcr
;
}
/* tune to first service found */
for
(
i
=
0
;
i
<
ts
->
nb_services
;
i
++
){
service
=
ts
->
services
[
i
];
sid
=
service
->
sid
;
/* tune to first service found */
for
(
i
=
0
;
i
<
ts
->
nb_services
;
i
++
){
service
=
ts
->
services
[
i
];
sid
=
service
->
sid
;
#ifdef DEBUG_SI
av_log
(
ts
->
stream
,
AV_LOG_DEBUG
,
"tuning to '%s'
\n
"
,
service
->
name
);
av_log
(
ts
->
stream
,
AV_LOG_DEBUG
,
"tuning to '%s'
\n
"
,
service
->
name
);
#endif
/* now find the info for the first service if we found any,
otherwise try to filter all PATs */
/* now find the info for the first service if we found any,
otherwise try to filter all PATs */
url_fseek
(
pb
,
pos
,
SEEK_SET
);
mpegts_set_service
(
ts
,
sid
);
url_fseek
(
pb
,
pos
,
SEEK_SET
);
mpegts_set_service
(
ts
,
sid
);
handle_packets
(
ts
,
s
->
probesize
);
}
/* if could not find service, enable auto_guess */
handle_packets
(
ts
,
s
->
probesize
);
}
/* if could not find service, enable auto_guess */
ts
->
auto_guess
=
1
;
ts
->
auto_guess
=
1
;
#ifdef DEBUG_SI
av_log
(
ts
->
stream
,
AV_LOG_DEBUG
,
"tuning done
\n
"
);
av_log
(
ts
->
stream
,
AV_LOG_DEBUG
,
"tuning done
\n
"
);
#endif
s
->
ctx_flags
|=
AVFMTCTX_NOHEADER
;
}
else
{
...
...
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