diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-11-27 18:22:02 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-11-28 22:51:37 +0100 |
commit | 271a00043ef3116d9561e45fa5773a0d9a0993c2 (patch) | |
tree | 0ee08413d6b3aa5eb114a8bef0f4d74915aa45a6 /libavformat/rawdec.c | |
parent | 68f289dacddcdf9742a8e9af51956ac226bfbafb (diff) | |
download | ffmpeg-271a00043ef3116d9561e45fa5773a0d9a0993c2.tar.gz |
lavf/rawdec: Do not mark streams from raw subtitle demuxers as data streams.
Improves "ffmpeg -i" output for raw dvbsub files.
Diffstat (limited to 'libavformat/rawdec.c')
-rw-r--r-- | libavformat/rawdec.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c index b38a4b5e5d..6249352d28 100644 --- a/libavformat/rawdec.c +++ b/libavformat/rawdec.c @@ -91,6 +91,17 @@ fail: return ret; } +int ff_raw_subtitle_read_header(AVFormatContext *s) +{ + AVStream *st = avformat_new_stream(s, NULL); + if (!st) + return AVERROR(ENOMEM); + st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE; + st->codecpar->codec_id = s->iformat->raw_codec_id; + st->start_time = 0; + return 0; +} + int ff_raw_data_read_header(AVFormatContext *s) { AVStream *st = avformat_new_stream(s, NULL); |