04.07.11 18:37, Maksym Veremeyenko написав(ла): > 03.07.11 23:06, Dan Dennedy написав(ла): >> On Sun, Jul 3, 2011 at 12:48 PM, Maksym Veremeyenko<ve...@m1stereo.tv> >> wrote: >>> On Sun, July 3, 2011 10:01 pm, Dan Dennedy wrote: >>>> 2011/7/3 Maksym Veremeyenko<ve...@m1stereo.tv>: >>>>> Hi, >>>>> >>>>> playing files in a loop mode in melted cause a leak of file descriptors >>>>> that >>>>> seen well from /proc/<process id>/fd/<file no>. >>>>> >>>>> the problem comes from avformat's producer re-open code that lost >>>>> release of >>>>> audiostream context. > [...] >> Please test my latest commits. In my analysis and testing while >> working on these fixes, I found it is not at all safe to close the >> audio format and codec contexts at this point - think parallel. >> > > i am not sure it it regression or related, but something influent a > decklink output, to be precise, out output. After hour or two i start > receive messages about decklink audio buffer underflow - it wrote less > samples then 1920.... > >
seems to me that latest update to avformat producer uncover an audio preroll problem to decklink consumer. applying simple patch: diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp index 0fb2361..0179de3 100644 --- a/src/modules/decklink/consumer_decklink.cpp +++ b/src/modules/decklink/consumer_decklink.cpp @@ -54,6 +54,7 @@ private: int m_isKeyer; IDeckLinkKeyer* m_deckLinkKeyer; bool m_terminate_on_pause; + uint32_t m_acnt; IDeckLinkDisplayMode* getDisplayMode() { @@ -428,6 +429,16 @@ public: virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted( IDeckLinkVideoFrame* completedFrame, BMDOutputFrameCompleti { + uint32_t cnt; + m_deckLinkOutput->GetBufferedAudioSampleFrameCount(&cnt); + if(cnt != m_acnt) + { + mlt_log_verbose( getConsumer(), + "ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount %d -> %d, m_count=%lld\n", + m_acnt, cnt, m_count ); + m_acnt = cnt; + }; + // When a video frame has been released by the API, schedule another video frame to be output // ignore handler if frame was flushed makes very interesting output: [...] [consumer decklink] ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount 1919 -> 2877, m_count=20164 (5) AS-RUN U0 "/tst_E0001531_43.dv" len 773 pos 725 [consumer decklink] ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount 2877 -> 3836, m_count=20937 (5) AS-RUN U0 "/BNC00975.mov" len 748 pos 702 [dv @ 0x80da0a0] Estimating duration from bitrate, this may be inaccurate [dv @ 0x82ff1c0] Estimating duration from bitrate, this may be inaccurate [consumer decklink] ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount 3836 -> 4794, m_count=21685 (5) AS-RUN U0 "/tst_E0001531_43.dv" len 773 pos 728 [consumer decklink] ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount 4794 -> 5754, m_count=22458 (5) AS-RUN U0 "/BNC00975.mov" len 748 pos 705 [dv @ 0x82ff1c0] Estimating duration from bitrate, this may be inaccurate [dv @ 0x8326820] Estimating duration from bitrate, this may be inaccurate (5) AS-RUN U0 "/tst_E0001531_43.dv" len 773 pos 732 [...] (5) AS-RUN U0 "/BNC00975.mov" len 748 pos 696 [dv @ 0x80da0a0] Estimating duration from bitrate, this may be inaccurate [dv @ 0x80d8580] Estimating duration from bitrate, this may be inaccurate [consumer decklink] ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount 5754 -> 6715, m_count=29290 [consumer decklink] ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount 6715 -> 5754, m_count=29291 (5) AS-RUN U0 "/tst_E0001531_43.dv" len 773 pos 722 for some reason decklink do not flush or drop some audio packet and as result it overrun after one second samples. i can't definitely find a reason, but i will look deeper... -- ________________________________________ Maksym Veremeyenko ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel