From dac291a65b06c6cd12a4d537e01b76c2ca899936 Mon Sep 17 00:00:00 2001
From: Lawrence Rust <lvr@softsystem.co.uk>
Date: Sat, 23 Jun 2012 18:31:53 +0200
Subject: [PATCH] transcode: Tolerate mpeg errors when re-encoding to I-frames around cut points
If a recording has a cutlist and is transcoded using that cutlist then
if there are MPEG decoding errors around the cut point the process of
re-coding to I frames can fail and the whole transcoding fails.
This patch makes the function MPEG2fixup::ConvertToI tolerant to
decoding errors and just skips the offending frames.
Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
---
mythtv/programs/mythtranscode/mpeg2fix.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/mythtv/programs/mythtranscode/mpeg2fix.cpp b/mythtv/programs/mythtranscode/mpeg2fix.cpp
index 520179b..f5685ba 100644
a
|
b
|
int MPEG2fixup::ConvertToI(FrameList *orderedFrames, int headPos) |
1655 | 1655 | { |
1656 | 1656 | int i = GetFrameNum((*it)); |
1657 | 1657 | if ((spare = DecodeToFrame(i, headPos == 0)) == NULL) |
1658 | | return 1; |
| 1658 | { |
| 1659 | LOG(VB_GENERAL, LOG_WARNING, |
| 1660 | QString("ConvertToI skipping undecoded frame #%1").arg(i)); |
| 1661 | continue; |
| 1662 | } |
1659 | 1663 | |
1660 | 1664 | if (GetFrameTypeT(spare) == 'I') |
1661 | 1665 | continue; |