Skip to content

Commit

Permalink
DVDDemuxFFMPEG: Avoiding truncating max_packet_size to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Apr 20, 2017
1 parent 3c0dc9e commit d8a86d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
Expand Up @@ -282,7 +282,7 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput, bool streaminfo, bool filein
m_ioContext = avio_alloc_context(buffer, FFMPEG_FILE_BUFFER_SIZE, 0, this, dvd_file_read, NULL, dvd_file_seek);
m_ioContext->max_packet_size = m_pInput->GetBlockSize();
if(m_ioContext->max_packet_size)
m_ioContext->max_packet_size *= FFMPEG_FILE_BUFFER_SIZE / m_ioContext->max_packet_size;
m_ioContext->max_packet_size = std::min(FFMPEG_FILE_BUFFER_SIZE, m_ioContext->max_packet_size);

if(m_pInput->Seek(0, SEEK_POSSIBLE) == 0)
m_ioContext->seekable = 0;
Expand Down

0 comments on commit d8a86d1

Please sign in to comment.