diff options
author | Joe Gorse <jhgorse@gmail.com> | 2016-02-25 11:34:40 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-02-25 11:34:40 +0200 |
commit | 2b63a88f26bdaa7bc9ade594f9f80e20f3b6afe2 (patch) | |
tree | 1b2c37f8f7bb773eb058854919829be372a7f9d7 /sys | |
parent | b48049a171fea505eed19fd5e7d3ce79976156c1 (diff) | |
download | gstreamer-plugins-bad-2b63a88f26bdaa7bc9ade594f9f80e20f3b6afe2.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/applemedia/avfvideosrc.m | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/applemedia/avfvideosrc.m b/sys/applemedia/avfvideosrc.m index 1c8f63397..529bd854d 100644 --- a/sys/applemedia/avfvideosrc.m +++ b/sys/applemedia/avfvideosrc.m @@ -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 { |