Skip to content

Commit

Permalink
Merge pull request #5100 from FernetMenta/ffmpeg24
Browse files Browse the repository at this point in the history
ffmpeg: adapt depreciated attribute max_analyze_duration
  • Loading branch information
fritsch committed Aug 2, 2014
2 parents beaf0f4 + e073b44 commit bb2f501
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
#include "URL.h"
#include "cores/FFmpeg.h"

extern "C" {
#include "libavutil/opt.h"
}

struct StereoModeConversionMap
{
Expand Down Expand Up @@ -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"
Expand All @@ -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);
Expand Down

0 comments on commit bb2f501

Please sign in to comment.