Message ID | HE1PR0301MB215418BDCD991B4B3C19940B8F429@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | aa2e0b868df559a17a10fc40578617bc254885b8 |
Headers | show |
Series | [FFmpeg-devel,1/2] avcodec/vc2enc: Actually zero padding | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Mon, Apr 26, 2021 at 19:15:10 +0200, Andreas Rheinhardt wrote:
> Subject: [PATCH 1/2] avcodec/vc2enc: Actually zero padding
Dieser Satz kein Verb.
In other words: I think you meant to write: "Actually apply zero
padding".
Cheers,
Moritz
Moritz Barsnick: > On Mon, Apr 26, 2021 at 19:15:10 +0200, Andreas Rheinhardt wrote: > >> Subject: [PATCH 1/2] avcodec/vc2enc: Actually zero padding > > Dieser Satz kein Verb. > In other words: I think you meant to write: "Actually apply zero > padding". > zero is the verb. - Andreas
On 4/27/2021 11:17 AM, Andreas Rheinhardt wrote: > Moritz Barsnick: >> On Mon, Apr 26, 2021 at 19:15:10 +0200, Andreas Rheinhardt wrote: >> >>> Subject: [PATCH 1/2] avcodec/vc2enc: Actually zero padding >> >> Dieser Satz kein Verb. >> In other words: I think you meant to write: "Actually apply zero >> padding". >> > zero is the verb. > > - Andreas You could change it to "Actually zero the padding", so it's clear that's the case.
James Almer: > On 4/27/2021 11:17 AM, Andreas Rheinhardt wrote: >> Moritz Barsnick: >>> On Mon, Apr 26, 2021 at 19:15:10 +0200, Andreas Rheinhardt wrote: >>> >>>> Subject: [PATCH 1/2] avcodec/vc2enc: Actually zero padding >>> >>> Dieser Satz kein Verb. >>> In other words: I think you meant to write: "Actually apply zero >>> padding". >>> >> zero is the verb. >> >> - Andreas > > You could change it to "Actually zero the padding", so it's clear that's > the case. Lynne approved it yesterday on IRC, so I have already pushed it. - Andreas
On Tue, Apr 27, 2021 at 16:17:55 +0200, Andreas Rheinhardt wrote: > Moritz Barsnick: > > In other words: I think you meant to write: "Actually apply zero > > padding". > zero is the verb. Ouch. Touché and thanks. Moritz
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 7bd2e4c2ab..6c2e873a23 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -993,7 +993,7 @@ static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } flush_put_bits(&s->pb); - avpkt->size = put_bits_count(&s->pb) >> 3; + av_shrink_packet(avpkt, put_bytes_output(&s->pb)); *got_packet = 1;
This encoder sets the min_size in ff_alloc_packet2(), so it can not rely on av_packet_make_refcounted() to zero the padding. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/vc2enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)