diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-08 23:05:08 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-07-18 04:26:35 +0200 |
commit | ea5bdc8893e4c1d5c3b417afad78ccedaa831789 (patch) | |
tree | ffe3ceb74f180034696d6dfc503c939117ac38c8 /libavformat/mpsubdec.c | |
parent | ef1302db2db67d483fcc37b0bbced61394c3620b (diff) | |
download | ffmpeg-ea5bdc8893e4c1d5c3b417afad78ccedaa831789.tar.gz |
avformat/subtitles: Deduplicate subtitles' read_(packet|seek|close)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mpsubdec.c')
-rw-r--r-- | libavformat/mpsubdec.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/libavformat/mpsubdec.c b/libavformat/mpsubdec.c index abf0e7fb9a..d290a41fb9 100644 --- a/libavformat/mpsubdec.c +++ b/libavformat/mpsubdec.c @@ -169,27 +169,6 @@ end: return res; } -static int mpsub_read_packet(AVFormatContext *s, AVPacket *pkt) -{ - MPSubContext *mpsub = s->priv_data; - return ff_subtitles_queue_read_packet(&mpsub->q, pkt); -} - -static int mpsub_read_seek(AVFormatContext *s, int stream_index, - int64_t min_ts, int64_t ts, int64_t max_ts, int flags) -{ - MPSubContext *mpsub = s->priv_data; - return ff_subtitles_queue_seek(&mpsub->q, s, stream_index, - min_ts, ts, max_ts, flags); -} - -static int mpsub_read_close(AVFormatContext *s) -{ - MPSubContext *mpsub = s->priv_data; - ff_subtitles_queue_clean(&mpsub->q); - return 0; -} - const AVInputFormat ff_mpsub_demuxer = { .name = "mpsub", .long_name = NULL_IF_CONFIG_SMALL("MPlayer subtitles"), @@ -197,8 +176,8 @@ const AVInputFormat ff_mpsub_demuxer = { .flags_internal = FF_FMT_INIT_CLEANUP, .read_probe = mpsub_probe, .read_header = mpsub_read_header, - .read_packet = mpsub_read_packet, - .read_seek2 = mpsub_read_seek, - .read_close = mpsub_read_close, .extensions = "sub", + .read_packet = ff_subtitles_read_packet, + .read_seek2 = ff_subtitles_read_seek, + .read_close = ff_subtitles_read_close, }; |