History

Rename functions and fields:

avfilter_(un)ref_pic -> avfilter_(un)ref_buffer avfilter_copy_picref_props -> avfilter_copy_buffer_ref_props AVFilterBufferRef.pic -> AVFilterBufferRef.buffer They have been renamed to allow sharing with audio. Patch by S.N. Hemanth Meenakshisundaram $smeenaks$ucsd$edu$. Originally committed as revision 24731 to svn://svn.ffmpeg.org/ffmpeg/trunk

S.N. Hemanth Meenakshisundaram committed 16 years ago

Commit 7fce4811 parent ecc8dad11 files · +49 −49Browse files

Showing the changes to libavfilter/avfilter.c (1 of 11 files). Show all

Unified · Split

libavfilter/avfilter.c+7−7
@@ -45,19 +45,19 @@ const char *avfilter_license(void) · 44 unmodified lines
4545 #define link_dpad(link) link->dst-> input_pads[link->dstpad]
4646 #define link_spad(link) link->src->output_pads[link->srcpad]
4747
48−AVFilterBufferRef *avfilter_ref_pic(AVFilterBufferRef *ref, int pmask)
48+AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
4949 {
5050 AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
5151 *ret = *ref;
5252 ret->perms &= pmask;
53− ret->pic->refcount ++;
53+ ret->buf->refcount ++;
5454 return ret;
5555 }
5656
57−void avfilter_unref_pic(AVFilterBufferRef *ref)
57+void avfilter_unref_buffer(AVFilterBufferRef *ref)
5858 {
59− if(!(--ref->pic->refcount))
60− ref->pic->free(ref->pic);
59+ if(!(--ref->buf->refcount))
60+ ref->buf->free(ref->buf);
6161 av_free(ref);
6262 }
6363
@@ -264,7 +264,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 200 unmodified lines
264264
265265 link->cur_pic = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h);
266266 link->srcpic = picref;
267− avfilter_copy_picref_props(link->cur_pic, link->srcpic);
267+ avfilter_copy_buffer_ref_props(link->cur_pic, link->srcpic);
268268 }
269269 else
270270 link->cur_pic = picref;
@@ -284,7 +284,7 @@ void avfilter_end_frame(AVFilterLink *link) · 13 unmodified lines
284284 /* unreference the source picture if we're feeding the destination filter
285285 * a copied version dues to permission issues */
286286 if(link->srcpic) {
287− avfilter_unref_pic(link->srcpic);
287+ avfilter_unref_buffer(link->srcpic);
288288 link->srcpic = NULL;
289289 }
290290

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