mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
CV_Assert
s changed
Some `CV_Assert`s changed to `CV_Assert_N`s according to https://github.com/opencv/opencv/issues/12304
This commit is contained in:
parent
d10a219833
commit
c94d75874b
@ -107,7 +107,7 @@ class XINECapture : public IVideoCapture
|
|||||||
|
|
||||||
bool open(const char *filename)
|
bool open(const char *filename)
|
||||||
{
|
{
|
||||||
CV_Assert(!xine, !stream, !vo_port);
|
CV_Assert_N(!xine, !stream, !vo_port);
|
||||||
char configfile[2048] = {0};
|
char configfile[2048] = {0};
|
||||||
|
|
||||||
xine = xine_new();
|
xine = xine_new();
|
||||||
@ -207,7 +207,7 @@ class XINECapture : public IVideoCapture
|
|||||||
|
|
||||||
double getProperty(int property_id) const CV_OVERRIDE
|
double getProperty(int property_id) const CV_OVERRIDE
|
||||||
{
|
{
|
||||||
CV_Assert(xine, vo_port, stream);
|
CV_Assert_N(xine, vo_port, stream);
|
||||||
int pos_t, pos_l, length;
|
int pos_t, pos_l, length;
|
||||||
bool res = (bool)xine_get_pos_length(stream, &pos_l, &pos_t, &length);
|
bool res = (bool)xine_get_pos_length(stream, &pos_l, &pos_t, &length);
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ class XINECapture : public IVideoCapture
|
|||||||
protected:
|
protected:
|
||||||
bool oldSeekFrame(int f)
|
bool oldSeekFrame(int f)
|
||||||
{
|
{
|
||||||
CV_Assert(xine, vo_port, stream);
|
CV_Assert_N(xine, vo_port, stream);
|
||||||
// no need to seek if we are already there...
|
// no need to seek if we are already there...
|
||||||
if (f == frame_number)
|
if (f == frame_number)
|
||||||
{
|
{
|
||||||
@ -290,7 +290,7 @@ protected:
|
|||||||
|
|
||||||
bool seekFrame(int f)
|
bool seekFrame(int f)
|
||||||
{
|
{
|
||||||
CV_Assert(xine, vo_port, stream);
|
CV_Assert_N(xine, vo_port, stream);
|
||||||
if (seekable)
|
if (seekable)
|
||||||
{
|
{
|
||||||
int new_time = (int)((f + 1) * (float)frame_duration);
|
int new_time = (int)((f + 1) * (float)frame_duration);
|
||||||
@ -309,7 +309,7 @@ protected:
|
|||||||
|
|
||||||
bool seekTime(int t)
|
bool seekTime(int t)
|
||||||
{
|
{
|
||||||
CV_Assert(xine, vo_port, stream);
|
CV_Assert_N(xine, vo_port, stream);
|
||||||
if (seekable)
|
if (seekable)
|
||||||
{
|
{
|
||||||
if (xine_play(stream, 0, t))
|
if (xine_play(stream, 0, t))
|
||||||
@ -328,7 +328,7 @@ protected:
|
|||||||
|
|
||||||
bool seekRatio(double ratio)
|
bool seekRatio(double ratio)
|
||||||
{
|
{
|
||||||
CV_Assert(xine, vo_port, stream);
|
CV_Assert_N(xine, vo_port, stream);
|
||||||
if (ratio > 1 || ratio < 0)
|
if (ratio > 1 || ratio < 0)
|
||||||
return false;
|
return false;
|
||||||
if (seekable)
|
if (seekable)
|
||||||
|
Loading…
Reference in New Issue
Block a user