avcodec/codec_internal: Use union for FFCodec decode/encode callbacks
This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
ce7dbd0481
commit
4243da4ff4
498 changed files with 760 additions and 675 deletions
|
|
@ -104,7 +104,7 @@ static void * attribute_align_arg worker(void *v){
|
|||
frame = task->indata;
|
||||
pkt = task->outdata;
|
||||
|
||||
ret = ffcodec(avctx->codec)->encode2(avctx, pkt, frame, &got_packet);
|
||||
ret = ffcodec(avctx->codec)->cb.encode(avctx, pkt, frame, &got_packet);
|
||||
if(got_packet) {
|
||||
int ret2 = av_packet_make_refcounted(pkt);
|
||||
if (ret >= 0 && ret2 < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue