populate mVideoStream and mAudioStream so we don't allocate new ones later
This commit is contained in:
parent
28d27cc30a
commit
335c1b1404
|
@ -316,6 +316,7 @@ int FfmpegCamera::OpenFfmpeg() {
|
||||||
if ( is_video_stream(stream) ) {
|
if ( is_video_stream(stream) ) {
|
||||||
if ( mVideoStreamId == -1 ) {
|
if ( mVideoStreamId == -1 ) {
|
||||||
mVideoStreamId = i;
|
mVideoStreamId = i;
|
||||||
|
mVideoStream = mFormatContext->streams[i];
|
||||||
// if we break, then we won't find the audio stream
|
// if we break, then we won't find the audio stream
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -324,6 +325,7 @@ int FfmpegCamera::OpenFfmpeg() {
|
||||||
} else if ( is_audio_stream(stream) ) {
|
} else if ( is_audio_stream(stream) ) {
|
||||||
if ( mAudioStreamId == -1 ) {
|
if ( mAudioStreamId == -1 ) {
|
||||||
mAudioStreamId = i;
|
mAudioStreamId = i;
|
||||||
|
mAudioStream = mFormatContext->streams[i];
|
||||||
} else {
|
} else {
|
||||||
Debug(2, "Have another audio stream.");
|
Debug(2, "Have another audio stream.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue