Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-11 Thread wm4
On Tue, 10 Mar 2015 18:02:12 +0100 Reimar Döffinger reimar.doeffin...@gmx.de wrote: On 10.03.2015, at 12:10, wm4 nfx...@googlemail.com wrote: On Mon, 09 Mar 2015 18:56:57 +0100 Reimar Döffinger reimar.doeffin...@gmx.de wrote: What I do is simply restart decoding with the packet that

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-11 Thread Reimar Döffinger
On 09.03.2015, at 15:54, Hendrik Leppkes h.lepp...@gmail.com wrote: Of course avcodec shouldn't crash when you use it, but a patch to disallow this combination would never be accepted by yourself and some others that like this cheap (albeit wrong) method for fallback. I forgot to reply: of

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-11 Thread Reimar Döffinger
On 11.03.2015, at 12:34, wm4 nfx...@googlemail.com wrote: On Tue, 10 Mar 2015 18:02:12 +0100 Reimar Döffinger reimar.doeffin...@gmx.de wrote: Also the buffering issue is the other way, when you try to go from multithreading to HW decode, how do you handle that? If it works well I'd be

Re: [FFmpeg-devel] [PATCH] pthread: Fix?ff_thread_get_formatissues?when called outside frame decode.

2015-03-10 Thread Rainer Hochecker
Hendrik Leppkes h.leppkes at gmail.com writes: Just making the ff_thread_finish_setup call in hevc_frame_start conditional on !hwaccel should do what the other patches did. My code isn't setup to use this path, so someone that does should test it and send it. - Hendrik

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-10 Thread wm4
On Mon, 09 Mar 2015 18:56:57 +0100 Reimar Döffinger reimar.doeffin...@gmx.de wrote: On 9 March 2015 15:28:48 CET, Hendrik Leppkes h.lepp...@gmail.com wrote: On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger reimar.doeffin...@gmx.de wrote: On 9 March 2015 13:34:24 CET, Hendrik Leppkes

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-10 Thread Reimar Döffinger
On 10.03.2015, at 12:10, wm4 nfx...@googlemail.com wrote: On Mon, 09 Mar 2015 18:56:57 +0100 Reimar Döffinger reimar.doeffin...@gmx.de wrote: What I do is simply restart decoding with the packet that failed the hardware decoder. Don't need to buffer anything, you still have the AVPacket in

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Reimar Döffinger
On 9 March 2015 13:34:24 CET, Hendrik Leppkes h.lepp...@gmail.com wrote: On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker fernetme...@online.de wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Any reason to believe this patch causes it? Because I can't see how it would. Maybe it's

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker fernetme...@online.de wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Any reason to believe this patch causes it? Because I can't see how it would. Maybe it's just a bug with DXVA and multithreading in the HEVC code? Can you

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger reimar.doeffin...@gmx.de wrote: On 9 March 2015 13:34:24 CET, Hendrik Leppkes h.lepp...@gmail.com wrote: On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker fernetme...@online.de wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Any

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 3:28 PM, Hendrik Leppkes h.lepp...@gmail.com wrote: On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger reimar.doeffin...@gmx.de wrote: On 9 March 2015 13:34:24 CET, Hendrik Leppkes h.lepp...@gmail.com wrote: On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Reimar Döffinger
On 9 March 2015 15:28:48 CET, Hendrik Leppkes h.lepp...@gmail.com wrote: On Mon, Mar 9, 2015 at 1:50 PM, Reimar Döffinger reimar.doeffin...@gmx.de wrote: On 9 March 2015 13:34:24 CET, Hendrik Leppkes h.lepp...@gmail.com wrote: On Mon, Mar 9, 2015 at 7:38 AM, Rainer Hochecker fernetme...@online.de

Re: [FFmpeg-devel] [PATCH] pthread: Fix?ff_thread_get_formatissues?when called outside frame decode.

2015-03-09 Thread Michael Niedermayer
On Mon, Mar 09, 2015 at 06:38:18AM +, Rainer Hochecker wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Any reason to believe this patch causes it? Because I can't see how it would. Maybe it's just a bug with DXVA and multithreading in the HEVC code? Can you provide

Re: [FFmpeg-devel] [PATCH] pthread: Fix?ff_thread_get_formatissues?when called outside frame decode.

2015-03-09 Thread Hendrik Leppkes
On Mon, Mar 9, 2015 at 11:06 PM, Michael Niedermayer michae...@gmx.at wrote: On Mon, Mar 09, 2015 at 06:38:18AM +, Rainer Hochecker wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Any reason to believe this patch causes it? Because I can't see how it would. Maybe it's

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Reimar Döffinger
On 09.03.2015, at 07:38, Rainer Hochecker fernetme...@online.de wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Any reason to believe this patch causes it? Because I can't see how it would. Maybe it's just a bug with DXVA and multithreading in the HEVC code? Can you provide

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-09 Thread Rainer Hochecker
Reimar Döffinger Reimar.Doeffinger at gmx.de writes: Any reason to believe this patch causes it? Because I can't see how it would. Maybe it's just a bug with DXVA and multithreading in the HEVC code? Can you provide some more information like a stacktrace, possibly using a tool like

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Rainer Hochecker
Reimar Döffinger Reimar.Doeffinger at gmx.de writes: I tried this patch with Kodi but did not get very far. int ff_thread_can_start_frame(AVCodecContext *avctx) { PerThreadContext *p = avctx-internal-thread_ctx; if (avctx-active_thread_typeFF_THREAD_FRAME) return 0;

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Reimar Döffinger
On 08.03.2015, at 19:15, Rainer Hochecker fernetme...@online.de wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: I tried this patch with Kodi but did not get very far. int ff_thread_can_start_frame(AVCodecContext *avctx) { PerThreadContext *p = avctx-internal-thread_ctx;

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Rainer Hochecker
Reimar Döffinger Reimar.Doeffinger at gmx.de writes: I have tested this with Kodi. Works with sw decoding. With DXVA it crashes, looks like heap corruption or the like. setting thread_safe_callbacks = 1 cures the issue but I get some green frames at start of playback.

Re: [FFmpeg-devel] [PATCH] pthread: Fix ff_thread_get_formatissues when called outside frame decode.

2015-03-08 Thread Reimar Döffinger
On 08.03.2015, at 22:56, Rainer Hochecker fernetme...@online.de wrote: Reimar Döffinger Reimar.Doeffinger at gmx.de writes: I have tested this with Kodi. Works with sw decoding. With DXVA it crashes, looks like heap corruption or the like. setting thread_safe_callbacks = 1 cures the issue