[mythtv] avformat error: -1

David George david at thegeorges.us
Sat Aug 14 20:35:08 EDT 2004

Daniel Thor Kristjansson wrote:

>This patch seems to have eliminated all the problems with the
>commercial decoder exiting on broken pre-recorded streams. My only
>question is what happens when you return from these functions with a -1
>value, is myth checking for that already? I'm concerned that when
>playing back a steam that is broken avformat will signal an error
>condition but myth will get stuck because it tries to keep playing the
I thought of that and looked to see what called 
AvFormatDecoder::OpenFile and it looks like it is called in 
NuppelVideoPlayer::OpenFile (around line 606) and that call does have 
error checking.

    int ret;
    if ((ret = decoder->OpenFile(ringBuffer, disablevideo, testbuf)) < 0)
        cerr << "Couldn't open decoder for: " << ringBuffer->GetFilename()
             << endl;
        return -1;

Unless I missed something, that seemed to be the only thing calling it.  
I did think about adding some SQL to remove the recording from the 
database, but I have been running here with no problems.  If I try to 
play a file that is bad it doesn't play, and then I just delete it.

More information about the mythtv-dev mailing list