History

Make avfilter_default_free_buffer() an internal shared symbol, so that it can be referenced outside defaults.c.

Originally committed as revision 25826 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 15 years ago

Commit 4723bc21 parent adc73052 files · +7 −3Browse files

Unified · Split

2 files
  1. libavfilter/defaults.c +4 −3
  2. libavfilter/internal.h +3 −0
libavfilter/defaults.c+4−3
@@ -23,9 +23,10 @@ · 22 unmodified lines
23#include "libavcore/imgutils.h"23#include "libavcore/imgutils.h"
24#include "libavcore/samplefmt.h"24#include "libavcore/samplefmt.h"
25#include "avfilter.h"25#include "avfilter.h"
26#include "internal.h"
26 27
27/* TODO: buffer pool. see comment for avfilter_default_get_video_buffer() */28/* TODO: buffer pool. see comment for avfilter_default_get_video_buffer() */
28static void avfilter_default_free_buffer(AVFilterBuffer *ptr)29void ff_avfilter_default_free_buffer(AVFilterBuffer *ptr)
29{30{
30 av_free(ptr->data[0]);31 av_free(ptr->data[0]);
31 av_free(ptr);32 av_free(ptr);
@@ -54,7 +55,7 @@ AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int per · 22 unmodified lines
54 55
55 pic->refcount = 1;56 pic->refcount = 1;
56 ref->format = link->format;57 ref->format = link->format;
57 pic->free = avfilter_default_free_buffer;58 pic->free = ff_avfilter_default_free_buffer;
58 av_image_fill_linesizes(pic->linesize, ref->format, ref->video->w);59 av_image_fill_linesizes(pic->linesize, ref->format, ref->video->w);
59 60
60 for (i = 0; i < 4; i++)61 for (i = 0; i < 4; i++)
@@ -108,7 +109,7 @@ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int per · 47 unmodified lines
108 ref->perms = perms | AV_PERM_READ;109 ref->perms = perms | AV_PERM_READ;
109 110
110 samples->refcount = 1;111 samples->refcount = 1;
111 samples->free = avfilter_default_free_buffer;112 samples->free = ff_avfilter_default_free_buffer;
112 113
113 sample_size = av_get_bits_per_sample_fmt(sample_fmt) >>3;114 sample_size = av_get_bits_per_sample_fmt(sample_fmt) >>3;
114 chans_nb = av_get_channel_layout_nb_channels(channel_layout);115 chans_nb = av_get_channel_layout_nb_channels(channel_layout);
libavfilter/internal.h+3−0
@@ -57,4 +57,7 @@ int ff_avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx); · 56 unmodified lines
57 */57 */
58int ff_avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);58int ff_avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);
59 59
60/** default handler for freeing audio/video buffer when there are no references left */
61void ff_avfilter_default_free_buffer(AVFilterBuffer *buf);
62
60#endif /* AVFILTER_INTERNAL_H */63#endif /* AVFILTER_INTERNAL_H */

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