iFrameExtractor EXC_BAD_ACCESS

时间:2013-10-20 19:19:15

标签: iphone ios xcode ffmpeg

当使用iFrameExtractor for iOS时,我在这一行上收到“EXC_BAD_ACCESS(code = 1,address = 0x8)错误:

- (AVPacket*)readPacket {

    if (_currentPacket.size > 0 || _inBuffer) return &_currentPacket;

    NSMutableData *packetData = [audioPacketQueue objectAtIndex:0];
    _packet = [packetData mutableBytes];

    // NSLog(@"got audio stream");
    **if (_packet->dts != AV_NOPTS_VALUE) {**
        _packet->dts += av_rescale_q(0, AV_TIME_BASE_Q, _audioStream->time_base);
    }
    if (_packet->pts != AV_NOPTS_VALUE) {
        _packet->pts += av_rescale_q(0, AV_TIME_BASE_Q, _audioStream->time_base);
    }
    // NSLog(@"ready with audio");


    [audioPacketQueueLock lock];
    audioPacketQueueSize -= _packet->size;
    [audioPacketQueue removeObjectAtIndex:0];
    [audioPacketQueueLock unlock];



    _currentPacket = *(_packet);

    return &_currentPacket;   
}

0 个答案:

没有答案