cap_dshow.cpp forgotten validity check (Bug #3044)


Added by Radek Svoboda almost 12 years ago. Updated over 11 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:Alexander Smorkalov % Done:

0%

Category:highgui-video
Target version:2.4.6
Affected version:2.4.5 (latest release) Operating System:Windows
Difficulty: HW Platform:x86
Pull request:https://github.com/Itseez/opencv/pull/970

Description

Hi, in cap_dshow.cpp, line 3198 in opencv 2.4.5. source code,

VI.getPixels( index, (uchar*)frame->imageData, false, true );
return frame;

there is a forgotten check to see whether grabbing the image was successful in videoInput lib (return value of VI.getPixels(...) function).
Consider updating to

if (VI.getPixels( index, (uchar*)frame->imageData, false, true ))
return frame;
else
return NULL;

This problem causes undetectable frame stuck (in my case after 4 days of running), because the image is not updated
because of error in videoinput or directshow but the OpenCV considers it OK.

Radek


Associated revisions

Revision 956d8027
Added by Alexander Smorkalov over 11 years ago

Bug #3044 cap_dshow.cpp forgotten validity check fixed.

Revision d0f789dc
Added by Alexander Alekhin over 10 years ago

Merge pull request #3044 from akarsakov:fix_ocl_tests

History

Updated by Alexander Smorkalov almost 12 years ago

  • Target version set to Next Hackathon
  • Category set to highgui-video
  • Assignee set to Alexander Smorkalov

Updated by Alexander Smorkalov almost 12 years ago

You can contribute your changes via pull request on GitHub. There is instruction here: http://code.opencv.org/projects/opencv/wiki/How_to_contribute

Updated by Alexander Smorkalov almost 12 years ago

  • Pull request set to https://github.com/Itseez/opencv/pull/970

Updated by Alexander Smorkalov almost 12 years ago

  • Status changed from Open to Done

Updated by Andrey Pavlenko over 11 years ago

  • Target version changed from Next Hackathon to 2.4.6
  • HW Platform set to x86
  • Operating System set to Windows
  • Start date deleted (2013-05-27)

Also available in: Atom PDF