mirror of https://github.com/odrling/Aegisub
Update libffms to r411
Originally committed to SVN as r5236.
This commit is contained in:
parent
3f9bead41a
commit
a4da8c3a61
|
@ -238,7 +238,7 @@ void FFMS_AudioSource::GetAudio(void *Buf, int64_t Start, int64_t Count) {
|
||||||
while (NewPacketNumber > 0 && !Frames[NewPacketNumber].KeyFrame) --NewPacketNumber;
|
while (NewPacketNumber > 0 && !Frames[NewPacketNumber].KeyFrame) --NewPacketNumber;
|
||||||
|
|
||||||
// Only seek forward if it'll actually result in moving forward
|
// Only seek forward if it'll actually result in moving forward
|
||||||
if (Start < CurrentSample || NewPacketNumber > PacketNumber) {
|
if (Start < CurrentSample || static_cast<size_t>(NewPacketNumber) > PacketNumber) {
|
||||||
PacketNumber = NewPacketNumber;
|
PacketNumber = NewPacketNumber;
|
||||||
Decoded = 0;
|
Decoded = 0;
|
||||||
CurrentSample = -1;
|
CurrentSample = -1;
|
||||||
|
|
|
@ -50,9 +50,6 @@ FFMS_Index *FFLAVFIndexer::DoIndexing() {
|
||||||
static_cast<FFMS_TrackType>(FormatContext->streams[i]->codec->codec_type)));
|
static_cast<FFMS_TrackType>(FormatContext->streams[i]->codec->codec_type)));
|
||||||
|
|
||||||
if (FormatContext->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
|
if (FormatContext->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
|
||||||
VideoContexts[i].Parser = av_parser_init(FormatContext->streams[i]->codec->codec_id);
|
|
||||||
if (!VideoContexts[i].Parser) continue;
|
|
||||||
|
|
||||||
AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codec->codec_id);
|
AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codec->codec_id);
|
||||||
if (!VideoCodec)
|
if (!VideoCodec)
|
||||||
throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED,
|
throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED,
|
||||||
|
@ -63,6 +60,8 @@ FFMS_Index *FFLAVFIndexer::DoIndexing() {
|
||||||
"Could not open video codec");
|
"Could not open video codec");
|
||||||
|
|
||||||
VideoContexts[i].CodecContext = FormatContext->streams[i]->codec;
|
VideoContexts[i].CodecContext = FormatContext->streams[i]->codec;
|
||||||
|
VideoContexts[i].Parser = av_parser_init(FormatContext->streams[i]->codec->codec_id);
|
||||||
|
if (VideoContexts[i].Parser)
|
||||||
VideoContexts[i].Parser->flags = PARSER_FLAG_COMPLETE_FRAMES;
|
VideoContexts[i].Parser->flags = PARSER_FLAG_COMPLETE_FRAMES;
|
||||||
IndexMask |= 1 << i;
|
IndexMask |= 1 << i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,6 @@
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
extern "C" {
|
extern "C" {
|
||||||
# include "libavutil/avstring.h"
|
# include "libavutil/avstring.h"
|
||||||
/* if you have this, we'll assume you have a new enough libavutil too */
|
|
||||||
# if LIBSWSCALE_VERSION_INT >= AV_VERSION_INT(0, 12, 0)
|
|
||||||
# include <libavutil/opt.h>
|
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
|
@ -49,6 +45,11 @@ extern const AVCodecTag ff_codec_bmp_tags[];
|
||||||
extern const CodecTags ff_mkv_codec_tags[];
|
extern const CodecTags ff_mkv_codec_tags[];
|
||||||
extern const AVCodecTag ff_codec_movvideo_tags[];
|
extern const AVCodecTag ff_codec_movvideo_tags[];
|
||||||
extern const AVCodecTag ff_codec_wav_tags[];
|
extern const AVCodecTag ff_codec_wav_tags[];
|
||||||
|
|
||||||
|
/* if you have this, we'll assume you have a new enough libavutil too */
|
||||||
|
#if LIBSWSCALE_VERSION_INT >= AV_VERSION_INT(0, 12, 0)
|
||||||
|
# include <libavutil/opt.h>
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int CPUFeatures;
|
extern int CPUFeatures;
|
||||||
|
|
Loading…
Reference in New Issue