From 66cc42cb19d6bf46bf696474a2f806fde68e0d00 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Fri, 8 Jan 2016 17:27:51 +0100 Subject: [PATCH] libeplayer3: add comments to input class, fix warning --- libeplayer3/input.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libeplayer3/input.cpp b/libeplayer3/input.cpp index 553e2d9..892d874 100644 --- a/libeplayer3/input.cpp +++ b/libeplayer3/input.cpp @@ -454,7 +454,7 @@ bool Input::Init(const char *filename) subtitleTrack = NULL; teletextTrack = NULL; -again: +//again: avfc = avformat_alloc_context(); avfc->interrupt_callback.callback = interrupt_cb; avfc->interrupt_callback.opaque = (void *) player; @@ -478,6 +478,9 @@ again: avfc->probesize = 131072; } + /* only call avformat_find_stream_info if no AAC + * stream is present to speed up playback start + * TODO: do we need avformat_find_stream_info at all? */ for (int i = 0; i < avfc->nb_streams; i++) { if (avfc->streams[i]->codec->codec_id == AV_CODEC_ID_AAC) find_info = false; @@ -486,6 +489,7 @@ again: err = avformat_find_stream_info(avfc, NULL); #if 0 + /* old code: we did retry if noprobe failed. Is this still needed? */ if (averror(err, avformat_find_stream_info)) { avformat_close_input(&avfc); if (player->noprobe) {