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
bad4e112
Commit
bad4e112
authored
Nov 23, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: use ff_subtitles_queue_seek() for text subtitles demuxers.
parent
ad5d72b1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
0 deletions
+54
-0
jacosubdec.c
libavformat/jacosubdec.c
+9
-0
microdvddec.c
libavformat/microdvddec.c
+9
-0
realtextdec.c
libavformat/realtextdec.c
+9
-0
samidec.c
libavformat/samidec.c
+9
-0
subviewerdec.c
libavformat/subviewerdec.c
+9
-0
webvttdec.c
libavformat/webvttdec.c
+9
-0
No files found.
libavformat/jacosubdec.c
View file @
bad4e112
...
...
@@ -248,6 +248,14 @@ static int jacosub_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ff_subtitles_queue_read_packet
(
&
jacosub
->
q
,
pkt
);
}
static
int
jacosub_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
min_ts
,
int64_t
ts
,
int64_t
max_ts
,
int
flags
)
{
JACOsubContext
*
jacosub
=
s
->
priv_data
;
return
ff_subtitles_queue_seek
(
&
jacosub
->
q
,
s
,
stream_index
,
min_ts
,
ts
,
max_ts
,
flags
);
}
AVInputFormat
ff_jacosub_demuxer
=
{
.
name
=
"jacosub"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"JACOsub subtitle format"
),
...
...
@@ -255,6 +263,7 @@ AVInputFormat ff_jacosub_demuxer = {
.
read_probe
=
jacosub_probe
,
.
read_header
=
jacosub_read_header
,
.
read_packet
=
jacosub_read_packet
,
.
read_seek2
=
jacosub_read_seek
,
.
read_close
=
jacosub_read_close
,
.
flags
=
AVFMT_GENERIC_INDEX
,
};
libavformat/microdvddec.c
View file @
bad4e112
...
...
@@ -126,6 +126,14 @@ static int microdvd_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ff_subtitles_queue_read_packet
(
&
microdvd
->
q
,
pkt
);
}
static
int
microdvd_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
min_ts
,
int64_t
ts
,
int64_t
max_ts
,
int
flags
)
{
MicroDVDContext
*
microdvd
=
s
->
priv_data
;
return
ff_subtitles_queue_seek
(
&
microdvd
->
q
,
s
,
stream_index
,
min_ts
,
ts
,
max_ts
,
flags
);
}
static
int
microdvd_read_close
(
AVFormatContext
*
s
)
{
MicroDVDContext
*
microdvd
=
s
->
priv_data
;
...
...
@@ -140,6 +148,7 @@ AVInputFormat ff_microdvd_demuxer = {
.
read_probe
=
microdvd_probe
,
.
read_header
=
microdvd_read_header
,
.
read_packet
=
microdvd_read_packet
,
.
read_seek2
=
microdvd_read_seek
,
.
read_close
=
microdvd_read_close
,
.
flags
=
AVFMT_GENERIC_INDEX
,
};
libavformat/realtextdec.c
View file @
bad4e112
...
...
@@ -125,6 +125,14 @@ static int realtext_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ff_subtitles_queue_read_packet
(
&
rt
->
q
,
pkt
);
}
static
int
realtext_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
min_ts
,
int64_t
ts
,
int64_t
max_ts
,
int
flags
)
{
RealTextContext
*
rt
=
s
->
priv_data
;
return
ff_subtitles_queue_seek
(
&
rt
->
q
,
s
,
stream_index
,
min_ts
,
ts
,
max_ts
,
flags
);
}
static
int
realtext_read_close
(
AVFormatContext
*
s
)
{
RealTextContext
*
rt
=
s
->
priv_data
;
...
...
@@ -139,6 +147,7 @@ AVInputFormat ff_realtext_demuxer = {
.
read_probe
=
realtext_probe
,
.
read_header
=
realtext_read_header
,
.
read_packet
=
realtext_read_packet
,
.
read_seek2
=
realtext_read_seek
,
.
read_close
=
realtext_read_close
,
.
flags
=
AVFMT_GENERIC_INDEX
,
.
extensions
=
"rt"
,
...
...
libavformat/samidec.c
View file @
bad4e112
...
...
@@ -112,6 +112,14 @@ static int sami_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ff_subtitles_queue_read_packet
(
&
sami
->
q
,
pkt
);
}
static
int
sami_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
min_ts
,
int64_t
ts
,
int64_t
max_ts
,
int
flags
)
{
SAMIContext
*
sami
=
s
->
priv_data
;
return
ff_subtitles_queue_seek
(
&
sami
->
q
,
s
,
stream_index
,
min_ts
,
ts
,
max_ts
,
flags
);
}
static
int
sami_read_close
(
AVFormatContext
*
s
)
{
SAMIContext
*
sami
=
s
->
priv_data
;
...
...
@@ -126,6 +134,7 @@ AVInputFormat ff_sami_demuxer = {
.
read_probe
=
sami_probe
,
.
read_header
=
sami_read_header
,
.
read_packet
=
sami_read_packet
,
.
read_seek2
=
sami_read_seek
,
.
read_close
=
sami_read_close
,
.
flags
=
AVFMT_GENERIC_INDEX
,
.
extensions
=
"smi,sami"
,
...
...
libavformat/subviewerdec.c
View file @
bad4e112
...
...
@@ -157,6 +157,14 @@ static int subviewer_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ff_subtitles_queue_read_packet
(
&
subviewer
->
q
,
pkt
);
}
static
int
subviewer_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
min_ts
,
int64_t
ts
,
int64_t
max_ts
,
int
flags
)
{
SubViewerContext
*
subviewer
=
s
->
priv_data
;
return
ff_subtitles_queue_seek
(
&
subviewer
->
q
,
s
,
stream_index
,
min_ts
,
ts
,
max_ts
,
flags
);
}
static
int
subviewer_read_close
(
AVFormatContext
*
s
)
{
SubViewerContext
*
subviewer
=
s
->
priv_data
;
...
...
@@ -171,6 +179,7 @@ AVInputFormat ff_subviewer_demuxer = {
.
read_probe
=
subviewer_probe
,
.
read_header
=
subviewer_read_header
,
.
read_packet
=
subviewer_read_packet
,
.
read_seek2
=
subviewer_read_seek
,
.
read_close
=
subviewer_read_close
,
.
flags
=
AVFMT_GENERIC_INDEX
,
.
extensions
=
"sub"
,
...
...
libavformat/webvttdec.c
View file @
bad4e112
...
...
@@ -168,6 +168,14 @@ static int webvtt_read_packet(AVFormatContext *s, AVPacket *pkt)
return
ff_subtitles_queue_read_packet
(
&
webvtt
->
q
,
pkt
);
}
static
int
webvtt_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
min_ts
,
int64_t
ts
,
int64_t
max_ts
,
int
flags
)
{
WebVTTContext
*
webvtt
=
s
->
priv_data
;
return
ff_subtitles_queue_seek
(
&
webvtt
->
q
,
s
,
stream_index
,
min_ts
,
ts
,
max_ts
,
flags
);
}
static
int
webvtt_read_close
(
AVFormatContext
*
s
)
{
WebVTTContext
*
webvtt
=
s
->
priv_data
;
...
...
@@ -182,6 +190,7 @@ AVInputFormat ff_webvtt_demuxer = {
.
read_probe
=
webvtt_probe
,
.
read_header
=
webvtt_read_header
,
.
read_packet
=
webvtt_read_packet
,
.
read_seek2
=
webvtt_read_seek
,
.
read_close
=
webvtt_read_close
,
.
flags
=
AVFMT_GENERIC_INDEX
,
.
extensions
=
"vtt"
,
...
...
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