libeplayer3: add comments to input class, fix warning

This commit is contained in:
Stefan Seyfried
2016-01-08 17:27:51 +01:00
parent d7403705d9
commit 66cc42cb19

View File

@@ -454,7 +454,7 @@ bool Input::Init(const char *filename)
subtitleTrack = NULL; subtitleTrack = NULL;
teletextTrack = NULL; teletextTrack = NULL;
again: //again:
avfc = avformat_alloc_context(); avfc = avformat_alloc_context();
avfc->interrupt_callback.callback = interrupt_cb; avfc->interrupt_callback.callback = interrupt_cb;
avfc->interrupt_callback.opaque = (void *) player; avfc->interrupt_callback.opaque = (void *) player;
@@ -478,6 +478,9 @@ again:
avfc->probesize = 131072; 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++) { for (int i = 0; i < avfc->nb_streams; i++) {
if (avfc->streams[i]->codec->codec_id == AV_CODEC_ID_AAC) if (avfc->streams[i]->codec->codec_id == AV_CODEC_ID_AAC)
find_info = false; find_info = false;
@@ -486,6 +489,7 @@ again:
err = avformat_find_stream_info(avfc, NULL); err = avformat_find_stream_info(avfc, NULL);
#if 0 #if 0
/* old code: we did retry if noprobe failed. Is this still needed? */
if (averror(err, avformat_find_stream_info)) { if (averror(err, avformat_find_stream_info)) {
avformat_close_input(&avfc); avformat_close_input(&avfc);
if (player->noprobe) { if (player->noprobe) {