mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
fixed of the ticket #1442
This commit is contained in:
parent
bb33f8dd3c
commit
196ac49fcf
@ -464,6 +464,7 @@ void CvCapture_FFMPEG::close()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -491,7 +492,7 @@ bool CvCapture_FFMPEG::reopen()
|
|||||||
AVCodecContext *enc = &ic->streams[video_stream]->codec;
|
AVCodecContext *enc = &ic->streams[video_stream]->codec;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
avcodec_thread_init(enc, get_number_of_cpus());
|
avcodec_thread_init(enc, std::min(get_number_of_cpus(), 16));
|
||||||
|
|
||||||
AVCodec *codec = avcodec_find_decoder(enc->codec_id);
|
AVCodec *codec = avcodec_find_decoder(enc->codec_id);
|
||||||
avcodec_open(enc, codec);
|
avcodec_open(enc, codec);
|
||||||
|
Loading…
Reference in New Issue
Block a user