From a1cb9f257b4b9d9f87faaf243c2857f2ee3a7c82 Mon Sep 17 00:00:00 2001
From: Lawrence Rust <lvr@softsystem.co.uk>
Date: Wed, 1 Feb 2012 19:22:12 +0100
Subject: [PATCH] mythtranscode: --fifoinfo reports aspect ratio of first uncut frame
This fixes a problem using the --fifoinfo option to report the format
of a recording. When using a cutlist the first few frames may be cut
and the format of the first uncut frame may be different from the first
physical frame.
This fixes a problem when using nuvexport etc if the recording starts
in widescreen e.g. for adverts but switches to 4:3 for the feature.
Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
---
mythtv/programs/mythtranscode/transcode.cpp | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/mythtv/programs/mythtranscode/transcode.cpp b/mythtv/programs/mythtranscode/transcode.cpp
index 7d8bb9d..3519e65 100644
|
a
|
b
|
int Transcode::TranscodeFile(const QString &inputname,
|
| 1436 | 1436 | if (!arb->m_passthru) |
| 1437 | 1437 | audio_codec_name = "raw"; |
| 1438 | 1438 | |
| | 1439 | // If cutlist is used then get info on first uncut frame |
| | 1440 | if (honorCutList && fifo_info) |
| | 1441 | { |
| | 1442 | bool is_key; |
| | 1443 | int did_ff; |
| | 1444 | frm_dir_map_t::iterator dm_iter; |
| | 1445 | player->TranscodeGetNextFrame(dm_iter, did_ff, is_key, true); |
| | 1446 | |
| | 1447 | QSize buf_size = player->GetVideoBufferSize(); |
| | 1448 | video_width = buf_size.width(); |
| | 1449 | video_height = buf_size.height(); |
| | 1450 | video_aspect = player->GetVideoAspect(); |
| | 1451 | video_frame_rate = player->GetFrameRate(); |
| | 1452 | } |
| | 1453 | |
| 1439 | 1454 | // Display details of the format of the fifo data. |
| 1440 | 1455 | LOG(VB_GENERAL, LOG_INFO, |
| 1441 | 1456 | QString("FifoVideoWidth %1").arg(video_width)); |