diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 8ae0bcd..9bfc44a 100644
a
|
b
|
__inline AVRational GetAVTimeBaseQ() |
90 | 90 | #define LOC QString("AFD: ") |
91 | 91 | |
92 | 92 | #define MAX_AC3_FRAME_SIZE 6144 |
| 93 | #define MAX_AVF_BIT_RATE 100000000U |
93 | 94 | |
94 | 95 | static const float eps = 1E-5; |
95 | 96 | |
… |
… |
int AvFormatDecoder::ScanStreams(bool novideo) |
2506 | 2507 | } |
2507 | 2508 | } |
2508 | 2509 | |
| 2510 | //If AVF uses PTS to calculate duration (and consequently bitrate) |
| 2511 | //and there are glitches in the recording that reset the PTS near |
| 2512 | //the end of the recording, the bitrate provided in ic->bit_rate |
| 2513 | //will be much much higher than the actual bitrate of the recording. |
| 2514 | // |
| 2515 | //This can cause problems with the RingBuffer because the fill_min |
| 2516 | //value will be set to a value larger than the buffer can hold, which |
| 2517 | //will cause reads to never be allowed. |
2509 | 2518 | if (ic && ((uint)ic->bit_rate > bitrate)) |
2510 | | bitrate = (uint)ic->bit_rate; |
| 2519 | bitrate = min((uint)ic->bit_rate,MAX_AVF_BIT_RATE); |
2511 | 2520 | |
2512 | 2521 | if (bitrate > 0) |
2513 | 2522 | { |