Permalink
Browse files

transcode: Tolerate mpeg errors when re-encoding to I-frames around c…

…ut 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.

Fixes #10863

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Gavin Hurlbut <ghurlbut@mythtv.org>
  • Loading branch information...
Lawrence Rust authored and Beirdo committed Jun 23, 2012
1 parent cb1775b commit 067ebe942a5ca1519d09a2b7b80da48abbd4bf51
Showing with 5 additions and 1 deletion.
  1. +5 −1 mythtv/programs/mythtranscode/mpeg2fix.cpp
@@ -1655,7 +1655,11 @@ int MPEG2fixup::ConvertToI(FrameList *orderedFrames, int headPos)
{
int i = GetFrameNum((*it));
if ((spare = DecodeToFrame(i, headPos == 0)) == NULL)
- return 1;
+ {
+ LOG(VB_GENERAL, LOG_WARNING,
+ QString("ConvertToI skipping undecoded frame #%1").arg(i));
+ continue;
+ }
if (GetFrameTypeT(spare) == 'I')
continue;

0 comments on commit 067ebe9

Please sign in to comment.