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/realtextdec.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/realtextdec.c')
-rw-r--r-- | libavformat/realtextdec.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c index e0e2cc90e6..c281dec346 100644 --- a/libavformat/realtextdec.c +++ b/libavformat/realtextdec.c @@ -127,27 +127,6 @@ end: return res; } -static int realtext_read_packet(AVFormatContext *s, AVPacket *pkt) -{ - RealTextContext *rt = s->priv_data; - 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; - ff_subtitles_queue_clean(&rt->q); - return 0; -} - const AVInputFormat ff_realtext_demuxer = { .name = "realtext", .long_name = NULL_IF_CONFIG_SMALL("RealText subtitle format"), @@ -155,8 +134,8 @@ const AVInputFormat ff_realtext_demuxer = { .flags_internal = FF_FMT_INIT_CLEANUP, .read_probe = realtext_probe, .read_header = realtext_read_header, - .read_packet = realtext_read_packet, - .read_seek2 = realtext_read_seek, - .read_close = realtext_read_close, .extensions = "rt", + .read_packet = ff_subtitles_read_packet, + .read_seek2 = ff_subtitles_read_seek, + .read_close = ff_subtitles_read_close, }; |