History

cbs: Refcount all the things!

This makes it easier for users of the CBS API to get alloc/free right - all subelements use the buffer API so that it's clear how to free them. It also allows eliding some redundant copies: the packet -> fragment copy disappears after this change if the input packet is refcounted, and more codec-specific cases are now possible (but not included in this patch).

Mark Thompson committed 8 years ago

Commit ce5870a1 parent 13ca5d315 files · +404 −279Browse files

Showing the changes to libavcodec/vaapi_encode_mpeg2.c (1 of 15 files). Show all

Unified · Split

libavcodec/vaapi_encode_mpeg2.c+1−1
@@ -92,7 +92,7 @@ static int vaapi_encode_mpeg2_add_header(AVCodecContext *avctx, · 91 unmodified lines
92 VAAPIEncodeMPEG2Context *priv = ctx->priv_data;92 VAAPIEncodeMPEG2Context *priv = ctx->priv_data;
93 int err;93 int err;
94 94
95 err = ff_cbs_insert_unit_content(priv->cbc, frag, -1, type, header);95 err = ff_cbs_insert_unit_content(priv->cbc, frag, -1, type, header, NULL);
96 if (err < 0) {96 if (err < 0) {
97 av_log(avctx, AV_LOG_ERROR, "Failed to add header: "97 av_log(avctx, AV_LOG_ERROR, "Failed to add header: "
98 "type = %d.\n", type);98 "type = %d.\n", type);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t