mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-27 09:32:35 -04:00
Solving bugs.
This commit is contained in:
@@ -25,8 +25,11 @@ extern "C" struct Stream
|
||||
{
|
||||
if(title != NULL)
|
||||
this->title= _strdup(title);
|
||||
if(languageCode != NULL)
|
||||
|
||||
if (languageCode != NULL)
|
||||
language = _strdup(languageCode);
|
||||
else
|
||||
language = _strdup("und");
|
||||
|
||||
if (codec != NULL)
|
||||
this->codec = _strdup(codec);
|
||||
|
||||
@@ -226,9 +226,11 @@ Stream *ExtractSubtitles(const char *path, const char *outPath, int *streamCount
|
||||
{
|
||||
*subtitleCount += 1;
|
||||
|
||||
AVDictionaryEntry *languagePtr = av_dict_get(inputStream->metadata, "language", NULL, 0);
|
||||
|
||||
//Get metadata for file name
|
||||
streams[i] = Stream(NULL, //title
|
||||
av_dict_get(inputStream->metadata, "language", NULL, 0)->value, //language
|
||||
languagePtr ? languagePtr->value : NULL, //language
|
||||
avcodec_get_name(inputCodecpar->codec_id), //format
|
||||
inputStream->disposition & AV_DISPOSITION_DEFAULT, //isDefault
|
||||
inputStream->disposition & AV_DISPOSITION_FORCED); //isForced
|
||||
|
||||
Reference in New Issue
Block a user