[FFmpeg-devel] [PATCH] libavformat/avidec: subtitle stream disable some non-interleaved process

Michael Niedermayer michael at niedermayer.cc
Sun Sep 10 17:44:22 EEST 2017


On Sun, Sep 10, 2017 at 12:45:19PM +0800, tiejun.peng wrote:
> non-interleaved process call avio_seek frequently, it will cause some performance issues especially in network play scene, such as http/ftp protocol.
> 
> Signed-off-by: tiejun.peng <tiejun.peng at foxmail.com>
> ---
>  libavformat/avidec.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> index b8a31dc..0220ea1 100644
> --- a/libavformat/avidec.c
> +++ b/libavformat/avidec.c
> @@ -1520,7 +1520,8 @@ resync:
>          }
>          ast->seek_pos= 0;
>  

> +        /* subtitle stream no need the next process, because subtitle's pkt->dts is always 0 */

The english grammer is not good


> -        if (!avi->non_interleaved && st->nb_index_entries>1 && avi->index_loaded>1) {
> +        if (!avi->non_interleaved && st->nb_index_entries>1 && avi->index_loaded>1 && st->codecpar->codec_type != AVMEDIA_TYPE_SUBTITLE) {

this already checks that there are multiple index entries

Do these all have the same timestamp ? it seems a bit counter intuitiv
to have 2 with dts=0. Please elaborate

also please provide a testcase to reproduce the issue

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170910/6098104f/attachment.sig>


More information about the ffmpeg-devel mailing list