update for last ffmpeg
authorcasta <casta@78f58264-58f8-0310-be4b-c7ad7e3b7018>
Mon, 24 Sep 2007 18:17:37 +0000 (18:17 +0000)
committercasta <casta@78f58264-58f8-0310-be4b-c7ad7e3b7018>
Mon, 24 Sep 2007 18:17:37 +0000 (18:17 +0000)
git-svn-id: svn+ssh://svn.xwing.info/home/svn/avi-ogminfo/trunk@813 78f58264-58f8-0310-be4b-c7ad7e3b7018

src/mpeg.cpp

index b896ec9b7b6c934b212c100a08f2d61c43c3d4e8..8e4a16fe12f922cec8eabbefff8c330f045eb8c2 100644 (file)
@@ -109,7 +109,7 @@ bool CMpeg::Analyse (Gtk::ProgressBar *_progressBar, Gtk::Button *_progressButto
             m_infos->SetVideoFrameRate (av_q2d (m_pFormatCtx->streams[nStr]->r_frame_rate));
             m_infos->SetVideoWidth (m_pFormatCtx->streams[nStr]->codec->coded_width);
             m_infos->SetVideoHeight (m_pFormatCtx->streams[nStr]->codec->coded_height);
-            if (m_pFormatCtx->duration != AV_NOPTS_VALUE)
+            if (m_pFormatCtx->duration)
             {
                 // XXX We use file duration instead of stream's one since it seems to be broken
                 m_infos->SetVideoTime (m_pFormatCtx->duration / AV_TIME_BASE);
@@ -151,7 +151,7 @@ bool CMpeg::Analyse (Gtk::ProgressBar *_progressBar, Gtk::Button *_progressButto
             temp.Channel = m_pFormatCtx->streams[nStr]->codec->channels;
             temp.Freq = m_pFormatCtx->streams[nStr]->codec->sample_rate;
             temp.BitRate = m_pFormatCtx->streams[nStr]->codec->bit_rate / 1000;
-            if (m_pFormatCtx->duration != AV_NOPTS_VALUE)
+            if (m_pFormatCtx->duration)
             {
                 // XXX We use file duration instead of stream's one since it seems to be broken
                 temp.AudioTime = m_pFormatCtx->duration / AV_TIME_BASE;