summaryrefslogtreecommitdiff
path: root/libavformat/mpl2dec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mpl2dec.c')
-rw-r--r--libavformat/mpl2dec.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/libavformat/mpl2dec.c b/libavformat/mpl2dec.c
index 0beb9ca388..912a707d1a 100644
--- a/libavformat/mpl2dec.c
+++ b/libavformat/mpl2dec.c
@@ -122,27 +122,6 @@ static int mpl2_read_header(AVFormatContext *s)
return 0;
}
-static int mpl2_read_packet(AVFormatContext *s, AVPacket *pkt)
-{
- MPL2Context *mpl2 = s->priv_data;
- return ff_subtitles_queue_read_packet(&mpl2->q, pkt);
-}
-
-static int mpl2_read_seek(AVFormatContext *s, int stream_index,
- int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
-{
- MPL2Context *mpl2 = s->priv_data;
- return ff_subtitles_queue_seek(&mpl2->q, s, stream_index,
- min_ts, ts, max_ts, flags);
-}
-
-static int mpl2_read_close(AVFormatContext *s)
-{
- MPL2Context *mpl2 = s->priv_data;
- ff_subtitles_queue_clean(&mpl2->q);
- return 0;
-}
-
const AVInputFormat ff_mpl2_demuxer = {
.name = "mpl2",
.long_name = NULL_IF_CONFIG_SMALL("MPL2 subtitles"),
@@ -150,8 +129,8 @@ const AVInputFormat ff_mpl2_demuxer = {
.flags_internal = FF_FMT_INIT_CLEANUP,
.read_probe = mpl2_probe,
.read_header = mpl2_read_header,
- .read_packet = mpl2_read_packet,
- .read_seek2 = mpl2_read_seek,
- .read_close = mpl2_read_close,
.extensions = "txt,mpl2",
+ .read_packet = ff_subtitles_read_packet,
+ .read_seek2 = ff_subtitles_read_seek,
+ .read_close = ff_subtitles_read_close,
};