Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread James Almer
On 3/14/2021 6:10 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: On 3/14/2021 3:25 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: I guess the fundamental problem of WRAPPED_AVFRAME is that deep copying it is not supported, but you don't exactly disallo

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread Marton Balint
On Sun, 14 Mar 2021, James Almer wrote: On 3/14/2021 3:25 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: I guess the fundamental problem of WRAPPED_AVFRAME is that deep copying it is not supported, but you don't exactly disallow that by using a size of 0, because the de

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread James Almer
On 3/14/2021 3:25 PM, Marton Balint wrote: On Sun, 14 Mar 2021, James Almer wrote: Is using sizeof(AVFrame) an issue apart from that it is not part of ABI? Is there an actual issue this patch fix? It doesn't fix a current issue, it ensures an issue doesn't arise in the future when a new fi

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread Marton Balint
On Sun, 14 Mar 2021, James Almer wrote: Is using sizeof(AVFrame) an issue apart from that it is not part of ABI? Is there an actual issue this patch fix? It doesn't fix a current issue, it ensures an issue doesn't arise in the future when a new field is added to AVFrame and it's lost when

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread James Almer
On 3/14/2021 9:23 AM, Marton Balint wrote: On Sat, 13 Mar 2021, James Almer wrote: Signed-off-by: James Almer --- Setting pkt->size to 0 but leaving pkt->data pointing to the frame ensures that the packet isn't mistaken for an empty one, and prevents wrong use of the data pointer in case a

Re: [FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-14 Thread Marton Balint
On Sat, 13 Mar 2021, James Almer wrote: Signed-off-by: James Almer --- Setting pkt->size to 0 but leaving pkt->data pointing to the frame ensures that the packet isn't mistaken for an empty one, and prevents wrong use of the data pointer in case av_packet_make_writable() is called on it (The

[FFmpeg-devel] [PATCH] avcodec/wrapped_avframe: stop using sizeof(AVFrame)

2021-03-13 Thread James Almer
Signed-off-by: James Almer --- Setting pkt->size to 0 but leaving pkt->data pointing to the frame ensures that the packet isn't mistaken for an empty one, and prevents wrong use of the data pointer in case av_packet_make_writable() is called on it (The resulting packet will be the same as if you c