mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
GIF-related fixes part 2
This commit is contained in:
@@ -50,11 +50,22 @@
|
||||
return result >= 0;
|
||||
}
|
||||
|
||||
- (bool)receiveIntoFrame:(FFMpegAVFrame *)frame {
|
||||
int status = avcodec_receive_frame(_impl, (AVFrame *)[frame impl]);
|
||||
- (bool)sendEnd {
|
||||
int status = avcodec_send_packet(_impl, nil);
|
||||
return status == 0;
|
||||
}
|
||||
|
||||
- (FFMpegAVCodecContextReceiveResult)receiveIntoFrame:(FFMpegAVFrame *)frame {
|
||||
int status = avcodec_receive_frame(_impl, (AVFrame *)[frame impl]);
|
||||
if (status == 0) {
|
||||
return FFMpegAVCodecContextReceiveResultSuccess;
|
||||
} else if (status == -35) {
|
||||
return FFMpegAVCodecContextReceiveResultNotEnoughData;
|
||||
} else {
|
||||
return FFMpegAVCodecContextReceiveResultError;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)flushBuffers {
|
||||
avcodec_flush_buffers(_impl);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
return _impl->pts;
|
||||
}
|
||||
|
||||
- (int64_t)duration {
|
||||
return _impl->pkt_duration;
|
||||
}
|
||||
|
||||
- (FFMpegAVFrameColorRange)colorRange {
|
||||
switch (_impl->color_range) {
|
||||
case AVCOL_RANGE_MPEG:
|
||||
|
||||
Reference in New Issue
Block a user