save cover if available, report avfc to streaminfo2

Origin commit data
------------------
Branch: master
Commit: 04ef6adff5
Author: TangoCash <eric@loxat.de>
Date: 2020-09-16 (Wed, 16 Sep 2020)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2020-09-16 21:40:39 +02:00
committed by vanhofen
parent 89efe1a366
commit ba6bc533cd
4 changed files with 62 additions and 3 deletions

View File

@@ -54,6 +54,7 @@ bool cPlayback::Open(playmode_t PlayMode)
last_size = 0;
nPlaybackSpeed = 0;
init_jump = -1;
avft = avformat_alloc_context();
if (!player)
{
@@ -117,7 +118,6 @@ bool cPlayback::Start(char *filename, int vpid, int vtype, int apid, int ac3, in
mAudioStream = 0;
mSubtitleStream = -1;
mTeletextStream = -1;
unlink("/tmp/.id3coverart");
std::string file;
if (*filename == '/')
@@ -856,11 +856,17 @@ uint64_t cPlayback::GetReadCount()
AVFormatContext *cPlayback::GetAVFormatContext()
{
return NULL;
if (player && player->container && player->container->selectedContainer)
{
player->container->selectedContainer->Command(player, CONTAINER_GET_AVCONTEXT, avft);
}
return avft;
}
void cPlayback::ReleaseAVFormatContext()
{
avft->streams = NULL;
avft->nb_streams = NULL;
}
#if 0