Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-12-09 Thread Michael Niedermayer
On Sat, Dec 09, 2017 at 09:46:53PM +0100, Marton Balint wrote: > > > On Mon, 27 Nov 2017, Michael Niedermayer wrote: > > >On Sun, Nov 26, 2017 at 12:09:35PM -0300, James Almer wrote: > >>On 11/21/2017 6:48 PM, Marton Balint wrote: > >>> > >>> > >>>On Thu, 9 Nov 2017, James Cowgill wrote: > >>>

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-12-09 Thread Marton Balint
On Mon, 27 Nov 2017, Michael Niedermayer wrote: On Sun, Nov 26, 2017 at 12:09:35PM -0300, James Almer wrote: On 11/21/2017 6:48 PM, Marton Balint wrote: On Thu, 9 Nov 2017, James Cowgill wrote: Hi, On 09/11/17 14:02, Hendrik Leppkes wrote: On Thu, Nov 9, 2017 at 1:21 PM, James Cowgill

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-26 Thread Michael Niedermayer
On Sun, Nov 26, 2017 at 12:09:35PM -0300, James Almer wrote: > On 11/21/2017 6:48 PM, Marton Balint wrote: > > > > > > On Thu, 9 Nov 2017, James Cowgill wrote: > > > >> Hi, > >> > >> On 09/11/17 14:02, Hendrik Leppkes wrote: > >>> On Thu, Nov 9, 2017 at 1:21 PM, James Cowgill

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-26 Thread Nicolas George
Marton Balint (2017-11-26): > Okay, I am exagarating a bit, but unconditionally returning AVERROR(ENOSYS) > would be an even better incentive, no? :) For invalid uses of the API that can be easily avoided by the application (like not explicitly passing NULL to a function), a hard crash is even

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-26 Thread Marton Balint
On Sun, 26 Nov 2017, James Almer wrote: On 11/26/2017 12:19 PM, Nicolas George wrote: James Almer (2017-11-26): The old decode API is not scheduled for removal right now probably because 99% of decoders need to be ported. I think this statement contains some confusion that is harmful to

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-26 Thread James Almer
On 11/26/2017 12:19 PM, Nicolas George wrote: > James Almer (2017-11-26): >> The old decode API is not scheduled for removal right now probably >> because 99% of decoders need to be ported. > > I think this statement contains some confusion that is harmful to the > discussion. > > There are two

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-26 Thread Nicolas George
James Almer (2017-11-26): > The old decode API is not scheduled for removal right now probably > because 99% of decoders need to be ported. I think this statement contains some confusion that is harmful to the discussion. There are two interfaces worth considering in this discussion: the

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-26 Thread James Almer
On 11/21/2017 6:48 PM, Marton Balint wrote: > > > On Thu, 9 Nov 2017, James Cowgill wrote: > >> Hi, >> >> On 09/11/17 14:02, Hendrik Leppkes wrote: >>> On Thu, Nov 9, 2017 at 1:21 PM, James Cowgill >>> wrote: In commit 061a0c14bb57 ("decode: restructure the core

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-26 Thread Michael Niedermayer
On Tue, Nov 21, 2017 at 10:48:19PM +0100, Marton Balint wrote: > > > On Thu, 9 Nov 2017, James Cowgill wrote: > > >Hi, > > > >On 09/11/17 14:02, Hendrik Leppkes wrote: > >>On Thu, Nov 9, 2017 at 1:21 PM, James Cowgill wrote: > >>>In commit 061a0c14bb57 ("decode:

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-21 Thread Marton Balint
On Thu, 9 Nov 2017, James Cowgill wrote: Hi, On 09/11/17 14:02, Hendrik Leppkes wrote: On Thu, Nov 9, 2017 at 1:21 PM, James Cowgill wrote: In commit 061a0c14bb57 ("decode: restructure the core decoding code"), the deprecated avcodec_decode_* APIs were reworked so

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-09 Thread James Cowgill
Hi, On 09/11/17 14:02, Hendrik Leppkes wrote: > On Thu, Nov 9, 2017 at 1:21 PM, James Cowgill wrote: >> In commit 061a0c14bb57 ("decode: restructure the core decoding code"), the >> deprecated avcodec_decode_* APIs were reworked so that they called into the >> new

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-09 Thread Nicolas George
Le nonidi 19 brumaire, an CCXXVI, Derek Buitenhuis a écrit : > Is it more sensible to actually return an error here? Otherwise it's just > enabling > future incorrect code; API users tend to ignore stderr warnings. I guess an > argument > could be made both ways. Actually, if the use of the API

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-09 Thread Derek Buitenhuis
On 11/9/2017 12:21 PM, James Cowgill wrote: > +if (avci->draining_done && pkt && pkt->size != 0) { > +av_log(avctx, AV_LOG_WARNING, "Got unexpected packet after EOF\n"); > +avcodec_flush_buffers(avctx); > +} Is it more sensible to actually return an error here? Otherwise

Re: [FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-09 Thread Hendrik Leppkes
On Thu, Nov 9, 2017 at 1:21 PM, James Cowgill wrote: > In commit 061a0c14bb57 ("decode: restructure the core decoding code"), the > deprecated avcodec_decode_* APIs were reworked so that they called into the > new avcodec_send_packet / avcodec_receive_frame API. This had the

[FFmpeg-devel] [PATCH] lavc: reset codec on receiving packet after EOF in compat_decode

2017-11-09 Thread James Cowgill
In commit 061a0c14bb57 ("decode: restructure the core decoding code"), the deprecated avcodec_decode_* APIs were reworked so that they called into the new avcodec_send_packet / avcodec_receive_frame API. This had the side effect of prohibiting sending new packets containing data after a drain