mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
avfvideosrc: Frame durations as CTime to the API, not double
Newer iOS seems to automatically convert, older iOS/OSX just crashes. https://bugzilla.gnome.org/show_bug.cgi?id=762575
This commit is contained in:
parent
b48049a171
commit
2b63a88f26
1 changed files with 2 additions and 4 deletions
|
@ -535,10 +535,8 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
|||
*/
|
||||
frame_duration_value = [rate valueForKey:@"minFrameDuration"];
|
||||
} else {
|
||||
double frame_duration;
|
||||
|
||||
gst_util_fraction_to_double (info->fps_d, info->fps_n, &frame_duration);
|
||||
frame_duration_value = [NSNumber numberWithDouble:frame_duration];
|
||||
// Invert fps_n and fps_d to get frame duration value and timescale (or numerator and denominator)
|
||||
frame_duration_value = [NSValue valueWithCMTime:CMTimeMake (info->fps_d, info->fps_n)];
|
||||
}
|
||||
[device setValue:frame_duration_value forKey:@"activeVideoMinFrameDuration"];
|
||||
@try {
|
||||
|
|
Loading…
Reference in a new issue