Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5100 from FernetMenta/ffmpeg24

ffmpeg: adapt depreciated attribute max_analyze_duration
  • Loading branch information...
commit bb2f501b6f6f8df0f65d5e76af92e2b6b6ae19e9 2 parents beaf0f4 + e073b44
Peter Frühberger fritsch authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
8 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
View
@@ -52,6 +52,9 @@
#include "URL.h"
#include "cores/FFmpeg.h"
+extern "C" {
+#include "libavutil/opt.h"
+}
struct StereoModeConversionMap
{
@@ -400,7 +403,7 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput)
// analyse very short to speed up mjpeg playback start
if (iformat && (strcmp(iformat->name, "mjpeg") == 0) && m_ioContext->seekable == 0)
- m_pFormatContext->max_analyze_duration = 500000;
+ av_opt_set_int(m_pFormatContext, "analyzeduration", 500000, 0);
// we need to know if this is matroska or avi later
m_bMatroska = strncmp(m_pFormatContext->iformat->name, "matroska", 8) == 0; // for "matroska.webm"
@@ -410,8 +413,7 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput)
{
/* too speed up dvd switches, only analyse very short */
if(m_pInput->IsStreamType(DVDSTREAM_TYPE_DVD))
- m_pFormatContext->max_analyze_duration = 500000;
-
+ av_opt_set_int(m_pFormatContext, "analyzeduration", 500000, 0);
CLog::Log(LOGDEBUG, "%s - avformat_find_stream_info starting", __FUNCTION__);
int iErr = avformat_find_stream_info(m_pFormatContext, NULL);
Please sign in to comment.
Something went wrong with that request. Please try again.