[mythtv] A tiny "don't die" patch
Steve Bower
sbower at cisco.com
Thu Sep 18 16:10:13 EDT 2003
Howdy folks,
Just getting into mythtv with my new pchdtv card, and ran into this
error from the backend:
avformat error: -1
And the backend exited. I'm looking in to the root cause, but in the
mean time here's a patch to make it just return an error code, instead
of exiting from the whole backend... :-)
If you have any "todo" stuff for pchdtv support (and especially using a
pchdtv card simultaneously with an NTSC card [PVR-250], which I was
unable to get to work), I'd be happy to start working on some things
once I get my brain around the code a little more.
Diff below my sig.
Keep up the great work!
Steve.
--
Steve Bower - ECS Unix Administrator - sbower at cisco.com
The ideas presented herein aren't necessarily the ideas presented herein.
Index: libs/libmythtv/avformatdecoder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/avformatdecoder.cpp,v
retrieving revision 1.53
diff -c -r1.53 avformatdecoder.cpp
*** libs/libmythtv/avformatdecoder.cpp 11 Sep 2003 15:38:11 -0000 1.53
--- libs/libmythtv/avformatdecoder.cpp 18 Sep 2003 18:35:09 -0000
***************
*** 256,270 ****
int err = av_open_input_file(&ic, filename, fmt, 0, ¶ms);
if (err < 0)
{
! cerr << "avformat error: " << err << endl;
! exit(0);
}
int ret = av_find_stream_info(ic);
if (ret < 0)
{
cerr << "could not find codec parameters: " << filename << endl;
! exit(0);
}
fmt->flags &= ~AVFMT_NOFILE;
--- 256,270 ----
int err = av_open_input_file(&ic, filename, fmt, 0, ¶ms);
if (err < 0)
{
! cerr << "avformat error opening " << filename << ": " << err << endl;
! return -1;
}
int ret = av_find_stream_info(ic);
if (ret < 0)
{
cerr << "could not find codec parameters: " << filename << endl;
! return -1;
}
fmt->flags &= ~AVFMT_NOFILE;
More information about the mythtv-dev
mailing list