aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvdrfan <vdrfan-nospam-@xbmc.org>2011-07-21 11:11:20 +0200
committervdrfan <vdrfan-nospam-@xbmc.org>2011-07-21 11:11:20 +0200
commite0ba636b4a57b6ccff22d1ad8596b25626550ca6 (patch)
tree26315996c53c233bdec98afdc097283bd07d2a20
parentfdfcdc194ee3a56167d24f1575c4f5d80efeb992 (diff)
fixed: no playback of mjpeg streams (fixes #11728)
-rw-r--r--xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
index 01b5894d63..4d74024c88 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -269,6 +269,8 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput)
iformat = m_dllAvFormat.av_find_input_format("mpeg");
else if( content.compare("video/x-mpegts") == 0 )
iformat = m_dllAvFormat.av_find_input_format("mpegts");
+ else if( content.compare("multipart/x-mixed-replace") == 0 )
+ iformat = m_dllAvFormat.av_find_input_format("mjpeg");
}
// try to abort after 30 seconds
@@ -432,6 +434,10 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput)
}
}
+ // analyse very short to speed up mjpeg playback start
+ if ((strcmp(iformat->name, "mjpeg") == 0) && m_ioContext->is_streamed)
+ m_pFormatContext->max_analyze_duration = 500000;
+
// we need to know if this is matroska or avi later
m_bMatroska = strncmp(m_pFormatContext->iformat->name, "matroska", 8) == 0; // for "matroska.webm"
m_bAVI = strcmp(m_pFormatContext->iformat->name, "avi") == 0;