diff mbox

[FFmpeg-devel] avfoundation, unsupported framerate/activeVideoMinFrameDuration

Message ID CANdMmMDfK1ynXwJMrufr0=UdNNZNCfixP2wkyL_G=0VHinEeRw@mail.gmail.com
State New
Headers show

Commit Message

Roman Puttkammer Nov. 15, 2017, 2:49 a.m. UTC
Hi,

Attached patch fixes an issue with avfoundation; the code continues to
loop through
the list of
supported formats/framerates even after finding the chosen one, ending up
with a bad format/rate
combination. (Code breaks out of one loop only instead of two.)

rgds,
Roman

-----
     if (!selected_format) {

Comments

Michael Niedermayer Nov. 16, 2017, 1:53 a.m. UTC | #1
On Wed, Nov 15, 2017 at 02:49:40AM +0000, Roman Puttkammer wrote:
> Hi,
> 
> Attached patch fixes an issue with avfoundation; the code continues to
> loop through
> the list of
> supported formats/framerates even after finding the chosen one, ending up
> with a bad format/rate
> combination. (Code breaks out of one loop only instead of two.)
> 
> rgds,
> Roman
> 
> -----
> diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
> index e2ddf47dbe..463ae60b63 100644
> --- a/libavdevice/avfoundation.m
> +++ b/libavdevice/avfoundation.m
> @@ -312,6 +312,7 @@ static int configure_video_device(AVFormatContext *s,
> AVCaptureDevice *video_dev
>                  }

Applying: avfoundation, unsupported framerate/activeVideoMinFrameDuration
error: corrupt patch at line 6

[...]
diff mbox

Patch

diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index e2ddf47dbe..463ae60b63 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -312,6 +312,7 @@  static int configure_video_device(AVFormatContext *s,
AVCaptureDevice *video_dev
                 }
             }
         }
+        if (selected_range) break;
     }