Open openradar-mirror opened 5 years ago
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-11-23T10:48:04.352239
Modified: 2018-12-04T00:15:29.779521
Description
Steps to Reproduce: 1) Create VTCompressionSession. 2) Start encoding process. 3) Call VTSessionCopyProperty() or VTSessionSetProperty() after every new frame sent to encoder. (ex: get kVTCompressionPropertyKey_AverageBitRate)
Eventually, compression session will fail with 'kVTVideoEncoderMalfunctionErr' status, and 'mediaserverd' will crash. Issue observed with different frequency, depending on working queue. Any queue (system or manually created), except
QOS_CLASS_UTILITY
will cause encoder to fail. System utility queue (QOS_CLASS_UTILITY
) will cause failure eventually, but with much lower rate.Issue is not observed if working thread suspended for some time (artificial delay of 0.1sec introduced between calls as example).
Source code to reproduce issue: https://www.dropbox.com/s/c4zx3mhxuyvgzkb/videotoolbox_issue.zip?dl=0
Expected Results: Calls to VTSessionCopyProperty should not lead to encoder failure.
Actual Results: VTCompressionSession switched to invalid state with 'kVTVideoEncoderMalfunctionErr' status. Any subsequent calls involving compressionSession will fail.
Version/Build:
iPhone 5 / 8.2
iPhone 5 / 10.3.3 (14G60)
iPhone 7 / 12.0.1 (16A404)
iPhone Xs / 12.0.1 (16A405)
iPhone 6 / 11.4.1 (15G77)
essentially any device/iOS version 8.0 to 12.1
Product Version: Created: 2018-11-21T20:11:02.241235 Originated: 2018-12-04T00:00:00 Open Radar Link: http://www.openradar.me/45889262