Re: [Mlt-devel] [Kdenlive-devel] AVCHD seeking committed into FFmpeg repository
Brought to you by:
ddennedy,
lilo_booter
From: Ivan S. <sch...@gm...> - 2009-09-14 06:06:07
|
Dan Dennedy wrote: > > On Sun, Sep 13, 2009 at 3:00 PM, Dan Dennedy <da...@de... > <mailto:da...@de...>> wrote: > > > [...] > > I switched to a Aug 10 checkout of FFmpeg r19624, which had been > working rather well, and I got a similar backtrace along with a > bunch of diverse backtraces all leading somewhere inside ffmpeg > including h264 codec and even once aiff! Then, I switched back to > my MLT branch not containing the new_seek code, and problems went > away. Finally, I returned back to the new_seek branch, and I had a > hunch that it was a concurrency in the MLT new_seek code, which is > triggered when kdenlive is updating the video thumnails as you > interactively drag the end points or when dragging a region from > clip monitor to timeline. I turned off the video thumbnail feature > in Kdenlive settings, and the crashing went away! Even with my > Sept 9 r19804 FFmpeg, new_seek works fine as long as thumbnails > are turned off. > > So, it should not be too hard for us to identify the concurrency > problem in the MLT new_seek branch. Then, I can include this in > the release and enable it by default for now for h264 in TS. > > > Good news. Remember how I wanted to move the code to determine > first_pts from producer_open to the first call to producer_get_image? > Well, I finally got that working, and that helped a little. Then, > after a little time in the debugger, and adding mutex locks around 2 > ffmpeg calls, and the problem appears to be fixed. All in all, I am > now inclined to include this in the next release. Ah, good to know that it was just incorrect use of the library. Yes, the library is NOT reentrant, so concurrency will cause such strange problems. I didn't think about it at all. I just wonder why new seeking code should have caused that (probably because the seek itself is simply more complex and the probability of clash is higher?). Nevertheless, there is still at least one bug remaining regarding broken MPEG-TS files (I posted it to FFmpeg forum with the workaround patch, so let's see). Regards, Ivan |