diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 8ae0bcd..bd00664 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 50000000 |
| 93 | 94 | |
| 94 | 95 | static const float eps = 1E-5; |
| 95 | 96 | |
| … |
… |
int AvFormatDecoder::ScanStreams(bool novideo)
|
| 2509 | 2510 | if (ic && ((uint)ic->bit_rate > bitrate)) |
| 2510 | 2511 | bitrate = (uint)ic->bit_rate; |
| 2511 | 2512 | |
| | 2513 | //If AVF uses PTS to calculate duration (and consequently bitrate) |
| | 2514 | //and there are glitches in the recording that reset the PTS near |
| | 2515 | //the end of the recording, the bitrate provided in ic->bit_rate |
| | 2516 | //will be much much higher than the actual bitrate of the recording. |
| | 2517 | // |
| | 2518 | //This can cause problems with the RingBuffer because the fill_min |
| | 2519 | //value will be set to a value larger than the buffer can hold, which |
| | 2520 | //will cause reads to never be allowed. |
| | 2521 | if ((uint)ic->bit_rate > MAX_AVF_BIT_RATE) |
| | 2522 | bitrate = MAX_AVF_BIT_RATE; |
| | 2523 | |
| | 2524 | |
| 2512 | 2525 | if (bitrate > 0) |
| 2513 | 2526 | { |
| 2514 | 2527 | bitrate = (bitrate + 999) / 1000; |