diff -u -r -p mythtv.102/external/FFmpeg/libavformat/mpegts.c mythtv/external/FFmpeg/libavformat/mpegts.c
|
old
|
new
|
static int read_packet(AVFormatContext *
|
| 2096 | 2096 | |
| 2097 | 2097 | for(;;) { |
| 2098 | 2098 | len = get_buffer(pb, buf, TS_PACKET_SIZE); |
| 2099 | | if (len != TS_PACKET_SIZE) |
| 2100 | | return AVERROR(EIO); |
| | 2099 | if (len != TS_PACKET_SIZE) { |
| | 2100 | if (pb->error == AVERROR(EAGAIN)) { |
| | 2101 | /* workarround to solve livetv ringbuffer underrun */ |
| | 2102 | pb->error = pb->eof_reached = 0; |
| | 2103 | return AVERROR(EAGAIN); |
| | 2104 | } else |
| | 2105 | return AVERROR(EIO); |
| | 2106 | } |
| 2101 | 2107 | /* check paquet sync byte */ |
| 2102 | 2108 | if (buf[0] != 0x47) { |
| 2103 | 2109 | /* find a new packet start */ |
diff -u -r -p mythtv.102/libs/libmythtv/ringbuffer.cpp mythtv/libs/libmythtv/ringbuffer.cpp
|
old
|
new
|
int RingBuffer::ReadPriv(void *buf, int
|
| 1149 | 1148 | { |
| 1150 | 1149 | // this can happen under a few conditions but the most |
| 1151 | 1150 | // notable is an exit from the read ahead thread or |
| 1152 | | // the end of the file stream has been reached. |
| 1153 | | VERBOSE(VB_FILE, LOC + loc_desc + ": ReadBufAvail() == 0"); |
| | 1151 | // the end of the file stream has been reached or |
| | 1152 | // encoder stream underrun when live tv switching to |
| | 1153 | // next program |
| | 1154 | VERBOSE(VB_FILE, LOC + loc_desc + ": ReadBufAvail() == 0" + |
| | 1155 | QString(" livetvchain=%1") |
| | 1156 | .arg(livetvchain ? 1 : 0)); |
| 1154 | 1157 | rwlock.unlock(); |
| 1155 | | return count; |
| | 1158 | return livetvchain ? -EAGAIN : -EIO; |
| 1156 | 1159 | } |
| 1157 | 1160 | |
| 1158 | 1161 | if (peek) |