Skip to content

Commit

Permalink
transcode: Tolerate mpeg errors when re-encoding to I-frames around c…
Browse files Browse the repository at this point in the history
…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 Jul 10, 2012
1 parent cb1775b commit 067ebe9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mythtv/programs/mythtranscode/mpeg2fix.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 067ebe9

Please sign in to comment.