Update ffms2 to r222. Fixes compilation with ancient ffmpeg's and is a better solution than verm's hack in r3578.
Originally committed to SVN as r3580.
This commit is contained in:
parent
16f5d0aea6
commit
5217854199
5 changed files with 34 additions and 4 deletions
|
@ -41,6 +41,18 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LIBAVCODEC_VERSION_INT
|
||||||
|
# if (LIBAVCODEC_VERSION_INT) >= (AV_VERSION_INT(52,29,0))
|
||||||
|
# define FFMS_HAVE_FFMPEG_COLORSPACE_INFO
|
||||||
|
# else
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
# pragma message("WARNING: Your FFmpeg is too old to support reporting colorspace and luma range information. The corresponding fields of FFMS_VideoProperties will be set to 0. Please update FFmpeg to get rid of this warning.")
|
||||||
|
# else
|
||||||
|
# warning "Your FFmpeg is too old to support reporting colorspace and luma range information. The corresponding fields of FFMS_VideoProperties will be set to 0. Please update FFmpeg to get rid of this warning."
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef AV_PKT_FLAG_KEY
|
#ifndef AV_PKT_FLAG_KEY
|
||||||
# define AV_PKT_FLAG_KEY PKT_FLAG_KEY
|
# define AV_PKT_FLAG_KEY PKT_FLAG_KEY
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -133,8 +133,13 @@ FFHaaliVideo::FFHaaliVideo(const char *SourceFile, int Track,
|
||||||
VP.RFFNumerator = CodecContext->time_base.den;
|
VP.RFFNumerator = CodecContext->time_base.den;
|
||||||
VP.NumFrames = Frames.size();
|
VP.NumFrames = Frames.size();
|
||||||
VP.TopFieldFirst = DecodeFrame->top_field_first;
|
VP.TopFieldFirst = DecodeFrame->top_field_first;
|
||||||
|
#ifdef FFMS_HAVE_FFMPEG_COLORSPACE_INFO
|
||||||
VP.ColorSpace = CodecContext->colorspace;
|
VP.ColorSpace = CodecContext->colorspace;
|
||||||
VP.ColorRange = CodecContext->color_range;
|
VP.ColorRange = CodecContext->color_range;
|
||||||
|
#else
|
||||||
|
VP.ColorSpace = 0;
|
||||||
|
VP.ColorRange = 0;
|
||||||
|
#endif
|
||||||
VP.FirstTime = ((Frames.front().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
VP.FirstTime = ((Frames.front().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
||||||
VP.LastTime = ((Frames.back().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
VP.LastTime = ((Frames.back().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,13 @@ FFLAVFVideo::FFLAVFVideo(const char *SourceFile, int Track, FFMS_Index *Index,
|
||||||
VP.RFFNumerator = CodecContext->time_base.den;
|
VP.RFFNumerator = CodecContext->time_base.den;
|
||||||
VP.NumFrames = Frames.size();
|
VP.NumFrames = Frames.size();
|
||||||
VP.TopFieldFirst = DecodeFrame->top_field_first;
|
VP.TopFieldFirst = DecodeFrame->top_field_first;
|
||||||
// VP.ColorSpace = CodecContext->colorspace;
|
#ifdef FFMS_HAVE_FFMPEG_COLORSPACE_INFO
|
||||||
// VP.ColorRange = CodecContext->color_range;
|
VP.ColorSpace = CodecContext->colorspace;
|
||||||
|
VP.ColorRange = CodecContext->color_range;
|
||||||
|
#else
|
||||||
|
VP.ColorSpace = 0;
|
||||||
|
VP.ColorRange = 0;
|
||||||
|
#endif
|
||||||
VP.FirstTime = ((Frames.front().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
VP.FirstTime = ((Frames.front().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
||||||
VP.LastTime = ((Frames.back().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
VP.LastTime = ((Frames.back().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
||||||
|
|
||||||
|
|
|
@ -96,8 +96,13 @@ FFMatroskaVideo::FFMatroskaVideo(const char *SourceFile, int Track,
|
||||||
VP.RFFNumerator = CodecContext->time_base.den;
|
VP.RFFNumerator = CodecContext->time_base.den;
|
||||||
VP.NumFrames = Frames.size();
|
VP.NumFrames = Frames.size();
|
||||||
VP.TopFieldFirst = DecodeFrame->top_field_first;
|
VP.TopFieldFirst = DecodeFrame->top_field_first;
|
||||||
// VP.ColorSpace = CodecContext->colorspace;
|
#ifdef FFMS_HAVE_FFMPEG_COLORSPACE_INFO
|
||||||
// VP.ColorRange = CodecContext->color_range;
|
VP.ColorSpace = CodecContext->colorspace;
|
||||||
|
VP.ColorRange = CodecContext->color_range;
|
||||||
|
#else
|
||||||
|
VP.ColorSpace = 0;
|
||||||
|
VP.ColorRange = 0;
|
||||||
|
#endif
|
||||||
VP.FirstTime = ((Frames.front().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
VP.FirstTime = ((Frames.front().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
||||||
VP.LastTime = ((Frames.back().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
VP.LastTime = ((Frames.back().DTS * Frames.TB.Num) / (double)Frames.TB.Den) / 1000;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,9 @@ extern "C" {
|
||||||
#include <libpostproc/postprocess.h>
|
#include <libpostproc/postprocess.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// must be included after ffmpeg headers
|
||||||
|
#include "ffmscompat.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "indexing.h"
|
#include "indexing.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
Loading…
Reference in a new issue