libeplayer3: work around duplicate ffmpeg stream ids by comparing stream addresses instead of pids (plus a couple of optimizations)

Origin commit data
------------------
Branch: master
Commit: 908ff30629
Author: martii <m4rtii@gmx.de>
Date: 2014-04-10 (Thu, 10 Apr 2014)


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

------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-04-10 23:35:38 +02:00
parent c313e41f08
commit c1ec620695
6 changed files with 83 additions and 128 deletions

View File

@@ -128,6 +128,7 @@ bool Output::Play()
if (videoStream && videofd > -1) {
videoWriter = Writer::GetWriter(videoStream->codec->codec_id, videoStream->codec->codec_type);
videoWriter->Init();
if (dioctl(videofd, VIDEO_SET_ENCODING, videoWriter->GetVideoEncoding(videoStream->codec->codec_id))
|| dioctl(videofd, VIDEO_PLAY, NULL))
ret = false;
@@ -135,6 +136,7 @@ bool Output::Play()
if (audioStream && audiofd > -1) {
audioWriter = Writer::GetWriter(audioStream->codec->codec_id, audioStream->codec->codec_type);
audioWriter->Init();
if (dioctl(audiofd, AUDIO_SET_ENCODING, audioWriter->GetAudioEncoding(audioStream->codec->codec_id))
|| dioctl(audiofd, AUDIO_PLAY, NULL))
ret = false;