On Mon, 20 Nov 2017, Jeyapal, Karthick wrote:

On 11/20/17, 12:39 AM, "Marton Balint" <c...@passwd.hu> wrote:

Thanks, there is one more thing I still don't get:

[...]
+    // 1 second timeout
+    for (i = 0; i < 10; i++) {
+        av_usleep(100000);
+        // Sometimes VideoInputFrameArrived is called before 
VideoInputFormatChanged
+        // So don't break for bmd_mode == AUTODETECT_DEFAULT_MODE

Even if you get a frame for the default mode, and
VideoInputFrameArrived is called early, the bmdFrameHasNoInputSource
flag should be set, so ctx->bmd_mode remains unknown, therefore you don't
have to handle it specially.

Are you saying that the Decklink drivers are buggy, and there are cases
where you get a frame without the bmdFrameHasNoInputSource flag, and then
a VideoInputFormatChanged callback later?

Yes, there are cases where you get a frame without the bmdFrameHasNoInputSource
flag, and then a VideoInputFormatChanged called later. And it is random.
But I don’t know if it could be called as a driver bug, since the getWidth and 
getHeight would return the correct values.
During my testing, I observed a 1080p30 would randomly get detected as,
AUTODETECT_DEFAULT_MODE because of VideoInputFrameArrived called early.
Hence I added that extra condition to handle it specially.

Ok, applied the series with some minor whitespace/comment fixes.

Thanks,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to