removed redundant get on smart pointer; made pictq_[r|w]index unsigned longs to be type compatible with std::array pictq.size(); fixes assert issue

librecast_all_the_things
Bret Curtis 2 years ago
parent bae8713998
commit f0db576611

@ -676,7 +676,7 @@ int VideoState::stream_open(int stream_index, AVFormatContext *pFormatCtx)
}
mAudioDecoder = mAudioFactory->createDecoder(this);
if (!mAudioDecoder.get())
if (!mAudioDecoder)
{
std::cerr << "Failed to create audio decoder, can not play audio stream" << std::endl;
avcodec_free_context(&this->audio_ctx);

@ -184,7 +184,8 @@ struct VideoState {
SwsContext* sws_context;
int sws_context_w, sws_context_h;
std::array<VideoPicture, VIDEO_PICTURE_QUEUE_SIZE+1> pictq; // allocate one extra to make sure we do not overwrite the osg::Image currently set on the texture
int pictq_size, pictq_rindex, pictq_windex;
int pictq_size;
unsigned long pictq_rindex, pictq_windex;
std::mutex pictq_mutex;
std::condition_variable pictq_cond;

Loading…
Cancel
Save