From 0f45bd7f514a41d7f1057866858ee709e6edd40d Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Mon, 21 Nov 2011 13:48:46 +0200 Subject: [PATCH] Fixed scan/framerate settings in the H.264 analyzer. --- femonh264.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/femonh264.c b/femonh264.c index 61e61c7..693976f 100644 --- a/femonh264.c +++ b/femonh264.c @@ -163,17 +163,16 @@ bool cFemonH264::processVideo(const uint8_t *buf, int len) if (aud_found) { m_VideoHandler->SetVideoCodec(VIDEO_CODEC_H264); if (sps_found) { - //debug("H.264 SPS: size %dx%d, aspect %d format %d framerate %.2f bitrate %.0f\n", m_Width, m_Height, m_AspectRatio, m_Format, m_FrameRate, m_BitRate); + //debug("H.264: size %dx%d, aspect %d format %d bitrate %.0f\n", m_Width, m_Height, m_AspectRatio, m_Format, m_BitRate); m_VideoHandler->SetVideoFormat(m_Format); m_VideoHandler->SetVideoSize(m_Width, m_Height); m_VideoHandler->SetVideoAspectRatio(m_AspectRatio); - m_VideoHandler->SetVideoScan(m_Scan); - m_VideoHandler->SetVideoFramerate((m_Scan == VIDEO_SCAN_PROGRESSIVE) ? (m_FrameRate / 2) : m_FrameRate); m_VideoHandler->SetVideoBitrate(m_BitRate); } - if (sei_found) { - //debug("H.264 SEI: scan %d\n", m_Scan); + if (sps_found || sei_found) { + //debug("H.264: scan %d framerate %.2f\n", m_Scan, (m_Scan == VIDEO_SCAN_PROGRESSIVE) ? (m_FrameRate / 2) : m_FrameRate); m_VideoHandler->SetVideoScan(m_Scan); + m_VideoHandler->SetVideoFramerate((m_Scan == VIDEO_SCAN_PROGRESSIVE) ? (m_FrameRate / 2) : m_FrameRate); } }