forked from mia/Aegisub
Update libffms to r411
Originally committed to SVN as r5236.
This commit is contained in:
parent
3f9bead41a
commit
a4da8c3a61
3 changed files with 9 additions and 9 deletions
|
@ -238,7 +238,7 @@ void FFMS_AudioSource::GetAudio(void *Buf, int64_t Start, int64_t Count) {
|
|||
while (NewPacketNumber > 0 && !Frames[NewPacketNumber].KeyFrame) --NewPacketNumber;
|
||||
|
||||
// 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;
|
||||
Decoded = 0;
|
||||
CurrentSample = -1;
|
||||
|
|
|
@ -50,9 +50,6 @@ FFMS_Index *FFLAVFIndexer::DoIndexing() {
|
|||
static_cast<FFMS_TrackType>(FormatContext->streams[i]->codec->codec_type)));
|
||||
|
||||
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);
|
||||
if (!VideoCodec)
|
||||
throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED,
|
||||
|
@ -63,7 +60,9 @@ FFMS_Index *FFLAVFIndexer::DoIndexing() {
|
|||
"Could not open video codec");
|
||||
|
||||
VideoContexts[i].CodecContext = FormatContext->streams[i]->codec;
|
||||
VideoContexts[i].Parser->flags = PARSER_FLAG_COMPLETE_FRAMES;
|
||||
VideoContexts[i].Parser = av_parser_init(FormatContext->streams[i]->codec->codec_id);
|
||||
if (VideoContexts[i].Parser)
|
||||
VideoContexts[i].Parser->flags = PARSER_FLAG_COMPLETE_FRAMES;
|
||||
IndexMask |= 1 << i;
|
||||
}
|
||||
else if (IndexMask & (1 << i) && FormatContext->streams[i]->codec->codec_type == CODEC_TYPE_AUDIO) {
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
# include <fcntl.h>
|
||||
extern "C" {
|
||||
# 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
|
||||
|
||||
|
@ -49,6 +45,11 @@ extern const AVCodecTag ff_codec_bmp_tags[];
|
|||
extern const CodecTags ff_mkv_codec_tags[];
|
||||
extern const AVCodecTag ff_codec_movvideo_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;
|
||||
|
|
Loading…
Reference in a new issue