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
45#define link_dpad(link) link->dst-> input_pads[link->dstpad]45#define link_dpad(link) link->dst-> input_pads[link->dstpad]
46#define link_spad(link) link->src->output_pads[link->srcpad]46#define link_spad(link) link->src->output_pads[link->srcpad]
47 47
48AVFilterBufferRef *avfilter_ref_pic(AVFilterBufferRef *ref, int pmask)48AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
49{49{
50 AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));50 AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
51 *ret = *ref;51 *ret = *ref;
52 ret->perms &= pmask;52 ret->perms &= pmask;
53 ret->pic->refcount ++;53 ret->buf->refcount ++;
54 return ret;54 return ret;
55}55}
56 56
57void avfilter_unref_pic(AVFilterBufferRef *ref)57void avfilter_unref_buffer(AVFilterBufferRef *ref)
58{58{
59 if(!(--ref->pic->refcount))59 if(!(--ref->buf->refcount))
60 ref->pic->free(ref->pic);60 ref->buf->free(ref->buf);
61 av_free(ref);61 av_free(ref);
62}62}
63 63
@@ -264,7 +264,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) · 200 unmodified lines
264 264
265 link->cur_pic = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h);265 link->cur_pic = avfilter_default_get_video_buffer(link, dst->min_perms, link->w, link->h);
266 link->srcpic = picref;266 link->srcpic = picref;
267 avfilter_copy_picref_props(link->cur_pic, link->srcpic);267 avfilter_copy_buffer_ref_props(link->cur_pic, link->srcpic);
268 }268 }
269 else269 else
270 link->cur_pic = picref;270 link->cur_pic = picref;
@@ -284,7 +284,7 @@ void avfilter_end_frame(AVFilterLink *link) · 13 unmodified lines
284 /* unreference the source picture if we're feeding the destination filter284 /* unreference the source picture if we're feeding the destination filter
285 * a copied version dues to permission issues */285 * a copied version dues to permission issues */
286 if(link->srcpic) {286 if(link->srcpic) {
287 avfilter_unref_pic(link->srcpic);287 avfilter_unref_buffer(link->srcpic);
288 link->srcpic = NULL;288 link->srcpic = NULL;
289 }289 }
290 290

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