History

Separate video specific BufferRef properties into VideoProps.

Define a new struct AVFilterBufferRefVideoProps and add a type field to AVFilterBufferRef. Video specific properties in AVFilterBufferRefVideoProps are now referred to by *video pointer in AVFilterBufferRef. Patch by S.N. Hemanth Meenakshisundaram smeenaks->ucsd.edu. Originally committed as revision 24763 to svn://svn.ffmpeg.org/ffmpeg/trunk

S.N. Hemanth Meenakshisundaram committed 16 years ago

Commit cc80caf1 parent fd7b11d10 files · +59 −42Browse files

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

Unified · Split

libavfilter/avfilter.c+7−2
@@ -49,6 +49,10 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask) · 48 unmodified lines
4949 {
5050 AVFilterBufferRef *ret = av_malloc(sizeof(AVFilterBufferRef));
5151 *ret = *ref;
52+ if (ref->type == AVMEDIA_TYPE_VIDEO) {
53+ ret->video = av_malloc(sizeof(AVFilterBufferRefVideoProps));
54+ *ret->video = *ref->video;
55+ }
5256 ret->perms &= pmask;
5357 ret->buf->refcount ++;
5458 return ret;
@@ -58,6 +62,7 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref) · 3 unmodified lines
5862 {
5963 if(!(--ref->buf->refcount))
6064 ref->buf->free(ref->buf);
65+ av_free(ref->video);
6166 av_free(ref);
6267 }
6368
@@ -179,7 +184,7 @@ void ff_dprintf_picref(void *ctx, AVFilterBufferRef *picref, int end) · 115 unmodified lines
179184 picref->data [0], picref->data [1], picref->data [2], picref->data [3],
180185 picref->linesize[0], picref->linesize[1], picref->linesize[2], picref->linesize[3],
181186 picref->pts, picref->pos,
182− picref->pixel_aspect.num, picref->pixel_aspect.den, picref->w, picref->h,
187+ picref->video->pixel_aspect.num, picref->video->pixel_aspect.den, picref->video->w, picref->video->h,
183188 end ? "\n" : "");
184189 }
185190
@@ -314,7 +319,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 128 unmodified lines
314319
315320 for(i = 0; i < 4; i ++) {
316321 int planew =
317− ff_get_plane_bytewidth(link->format, link->cur_buf->w, i);
322+ ff_get_plane_bytewidth(link->format, link->cur_buf->video->w, i);
318323
319324 if(!src[i]) continue;
320325

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