mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
fixed property for ffmpeg
This commit is contained in:
parent
d8b93b3569
commit
d0176d69f2
@ -446,6 +446,9 @@ bool CvCapture_FFMPEG::reopen()
|
||||
#else
|
||||
AVCodecContext *enc = &ic->streams[video_stream]->codec;
|
||||
#endif
|
||||
|
||||
avcodec_thread_init(enc, count_threads);
|
||||
|
||||
AVCodec *codec = avcodec_find_decoder(enc->codec_id);
|
||||
avcodec_open(enc, codec);
|
||||
video_st = ic->streams[video_stream];
|
||||
@ -714,7 +717,7 @@ double CvCapture_FFMPEG::getProperty( int property_id )
|
||||
return (double)video_st->codec.codec_tag;
|
||||
#endif
|
||||
break;
|
||||
case CV_FFMPEG_CAP_PROP_THREADS:
|
||||
case CV_CAP_PROP_THREADS:
|
||||
return count_threads;
|
||||
break;
|
||||
}
|
||||
@ -802,7 +805,7 @@ bool CvCapture_FFMPEG::setProperty( int property_id, double value )
|
||||
}
|
||||
break;
|
||||
|
||||
case CV_FFMPEG_CAP_PROP_THREADS:
|
||||
case CV_CAP_PROP_THREADS:
|
||||
{
|
||||
count_threads = (int)value;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user