diff options
author | Marton Balint <cus@passwd.hu> | 2013-10-23 20:55:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-27 23:12:41 +0100 |
commit | dbe6f9f2c2330e7c230ddd61af1cc2069af1cf04 (patch) | |
tree | 914cb81b534725368160c8994b9f11f733526435 /libavcodec/avcodec.h | |
parent | b387a24cb4ad14f567ae2643a7959fe61b82f95a (diff) | |
download | ffmpeg-dbe6f9f2c2330e7c230ddd61af1cc2069af1cf04.tar.gz |
lavc: add support for CODEC_CAP_DELAY in subtitles
This patch adds CODEC_CAP_DELAY support to avcodec_decode_subtitle2.
For DVB teletext decoding, a single teletext packet can contain multiple
teletext pages. In order to support that, the teletext decoder may buffer
some pages.
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 01a1be2f2f..fe64b38986 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3894,6 +3894,14 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, * and reusing a get_buffer written for video codecs would probably perform badly * due to a potentially very different allocation pattern. * + * Some decoders (those marked with CODEC_CAP_DELAY) have a delay between input + * and output. This means that for some packets they will not immediately + * produce decoded output and need to be flushed at the end of decoding to get + * all the decoded data. Flushing is done by calling this function with packets + * with avpkt->data set to NULL and avpkt->size set to 0 until it stops + * returning subtitles. It is safe to flush even those decoders that are not + * marked with CODEC_CAP_DELAY, then no subtitles will be returned. + * * @param avctx the codec context * @param[out] sub The AVSubtitle in which the decoded subtitle will be stored, must be freed with avsubtitle_free if *got_sub_ptr is set. |