[Ffmpeg-devel-irc] ffmpeg-devel.log.20180811
burek
burek021 at gmail.com
Sun Aug 12 03:05:04 EEST 2018
[15:19:54 CEST] <gagandeepsingh> durandal_1707: since i am using update_thread_context, finish_thread_setup doesn't execute automatically, so in case i have less packets than the threads, how to handle that?
[15:21:51 CEST] <gagandeepsingh> and, valgrind is detecting memory leaks in cfhd_close
[15:22:00 CEST] <durandal_1707> gagandeepsingh: that should be handled automatically i think, have you fixed crash?
[15:25:38 CEST] <gagandeepsingh> i am working on it
[15:26:02 CEST] <durandal_1707> gagandeepsingh: have you located crash with valgrind?
[15:26:38 CEST] <gagandeepsingh> in cfhd_close function
[15:26:46 CEST] <gagandeepsingh> at least for the intra only part
[15:27:14 CEST] <gagandeepsingh> only in cfhd_close function during freeing the frames that i allocated in the beginning
[15:29:31 CEST] <durandal_1707> gagandeepsingh: if another thread holds frame you need to use ff_thrad_release_buffer()
[15:30:46 CEST] <gagandeepsingh> i am using thread_release_buffer() for both the frames that i allocated before freeing both frames
[15:31:48 CEST] <durandal_1707> gagandeepsingh: it crash when realeasing buffer or when freeing one?
[15:36:32 CEST] <gagandeepsingh> the first 2 errors that valgrind detects are when i try to access the frame via pointer to check is f->data[0] is non null, before releasing buffers, then the next errors are detected in av_frame_free
[15:36:42 CEST] <gagandeepsingh> as if the frame wasn't allocated
[15:36:50 CEST] <gagandeepsingh> in the beginning
[15:37:42 CEST] <durandal11707> gagandeepsingh: pastebin valgrind output
[15:38:52 CEST] <gagandeepsingh> https://pastebin.com/SG1biXNF
[15:39:12 CEST] <gagandeepsingh> the sample has only one packet worth of data
[15:40:12 CEST] <gagandeepsingh> durandal_1707: here is the file for referencing : https://pastebin.com/LD9YfU0n
[15:44:44 CEST] <durandal_1707> gagandeepsingh: have you tried to check if frame pointer is not NULL ?
[15:47:30 CEST] <gagandeepsingh> if (s->i_frame.f), checks if the frame pointer is null or not before trying to check if frame has buffers refs
[15:49:13 CEST] <gagandeepsingh> yup, line 1456 first checks that and then sees if f->data[0] is null or not
[15:49:14 CEST] <durandal_1707> gagandeepsingh: have you tried with allocate_progress always being set to 1?
[15:49:26 CEST] <gagandeepsingh> in init?
[15:49:41 CEST] <durandal_1707> yes
[15:49:47 CEST] <gagandeepsingh> no,
[15:49:51 CEST] <gagandeepsingh> let me see
[15:50:51 CEST] <gagandeepsingh> doesn't work with it always set to 1
[15:51:33 CEST] <gagandeepsingh> that file with just one sample returns seg fault on closing ffplay
[15:52:04 CEST] <gagandeepsingh> also in ./ffmpeg, just tried
[15:55:46 CEST] <durandal_1707> gagandeepsingh: what about commenting init threadsafe cap?
[15:56:19 CEST] <durandal_1707> just comment out all .caps_internal
[15:56:38 CEST] <gagandeepsingh> let me see
[15:58:27 CEST] <gagandeepsingh> doesn't work, the stdout is also giving the error double free or corruption(out)
[16:04:06 CEST] <durandal_1707> gagandeepsingh: your other threads need init_thread_copy function to allocate frames too
[16:05:08 CEST] <durandal_1707> because upon init, avctx priv data is simply copied to other threads
[16:07:38 CEST] <gagandeepsingh> i haven't created that function in cfhd, perhaps that might have been the error
[16:08:00 CEST] <durandal_1707> and at close, it will crash because race among threads will cause to free already modified data
[16:08:27 CEST] <gagandeepsingh> yeah, that makes sense, i will need to provide that function for cfhd
[16:08:43 CEST] <gagandeepsingh> thanks for a new lead, i will see and ping if i need to understand something
[21:56:48 CEST] <cone-916> ffmpeg 03Sasi Inguva 07master:12673bb25342: lavf/mov.c: Set start_time for all streams (in case of edit lists).
[21:56:48 CEST] <cone-916> ffmpeg 03Sergey Lavrushkin 07master:00ae3498bf03: libavutil: Adds gray floating-point pixel formats.
[00:00:00 CEST] --- Sun Aug 12 2018
More information about the Ffmpeg-devel-irc
mailing list