Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12179 closed Bug Report - General (fixed)

MythTV doesn't play file

Reported by: JYA Owned by: JYA
Priority: minor Milestone: 0.27.2
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

File http://nrkbeta.no/2009/12/18/bergensbanen-eng/

doesn't play http://nrkbeta.no/torrent/divtorrents/Bergensbanen-minutt.for.minutt.1280x720p50.h264.NRK.mp4.torrent

The cause for the failure is related to how the RingBuffer::Read behaves.

It waits until there's exactly the number of bytes requested. Here, FFmpeg seek to the end of the file and request 5189405 but we are 4161536 from the end of the file only.

It times out after 16s waiting.

RingBuffer::Read should returns only what is currently available and not wait unnecessarily, letting FFmpeg deal with the retries.

Change History (5)

comment:1 by JYA, 11 years ago

diff --git a/mythtv/libs/libmythtv/ringbuffer.cpp b/mythtv/libs/libmythtv/ringbu
index 5628863..8dbd62c 100644
--- a/mythtv/libs/libmythtv/ringbuffer.cpp
+++ b/mythtv/libs/libmythtv/ringbuffer.cpp
@@ -1251,6 +1251,7 @@ bool RingBuffer::WaitForAvail(int count)
 {
     int avail = ReadBufAvail();
     count = (ateof && avail < count) ? avail : count;
+    count = !ateof && avail < count && avail > 0 ? avail : count;

     if (livetvchain && setswitchtonext && avail < count)
     {

this allows to play that particular file. However I'm not comfortable with simply returning a value > 0 if we have one.

We should still wait under special circumstances.

still looking at a more appropriate fix, that would less likely cause regression

comment:2 by JYA, 11 years ago

I feel #10658 was likely a good solution for this:

it doesn't wait after just a seek, and still wait 10s for other types of read

comment:3 by Jean-Yves Avenard <jyavenard@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 13845afd923f2706134424b2e458d02c89ab5d83/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:4 by Jean-Yves Avenard <jyavenard@…>, 11 years ago

In 5433b7647f6ce97b606c36829340ae311ef7da4c/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:5 by Jean-Yves Avenard <jyavenard@…>, 11 years ago

In 5aa484744061688ac850a70d16980834e736f44c/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available
Note: See TracTickets for help on using tickets.