Commited in SoC by Vitor Sessak on 2008-02-09 11:03:35 Originally committed as revision 12040 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all
Unified · Split
| @@ -213,10 +213,12 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref) · 212 unmodified lines | ||
| 213 | 213 | /* prepare to copy the picture if it has insufficient permissions */ |
| 214 | 214 | if((link_dpad(link).min_perms & picref->perms) != link_dpad(link).min_perms || |
| 215 | 215 | link_dpad(link).rej_perms & picref->perms) { |
| 216 | + /* | |
| 216 | 217 | av_log(link->dst, AV_LOG_INFO, |
| 217 | 218 | "frame copy needed (have perms %x, need %x, reject %x)\n", |
| 218 | 219 | picref->perms, |
| 219 | 220 | link_dpad(link).min_perms, link_dpad(link).rej_perms); |
| 221 | + */ | |
| 220 | 222 | |
| 221 | 223 | link->cur_pic = avfilter_default_get_video_buffer(link, link_dpad(link).min_perms); |
| 222 | 224 | link->srcpic = picref; |
| @@ -231,6 +233,11 @@ void avfilter_end_frame(AVFilterLink *link) · 8 unmodified lines | ||
| 231 | 233 | { |
| 232 | 234 | void (*end_frame)(AVFilterLink *); |
| 233 | 235 | |
| 236 | + if(!(end_frame = link_dpad(link).end_frame)) | |
| 237 | + end_frame = avfilter_default_end_frame; | |
| 238 | + | |
| 239 | + end_frame(link); | |
| 240 | + | |
| 234 | 241 | /* unreference the source picture if we're feeding the destination filter |
| 235 | 242 | * a copied version dues to permission issues */ |
| 236 | 243 | if(link->srcpic) { |
| @@ -238,10 +245,6 @@ void avfilter_end_frame(AVFilterLink *link) · 1 unmodified line | ||
| 238 | 245 | link->srcpic = NULL; |
| 239 | 246 | } |
| 240 | 247 | |
| 241 | − if(!(end_frame = link_dpad(link).end_frame)) | |
| 242 | − end_frame = avfilter_default_end_frame; | |
| 243 | − | |
| 244 | − end_frame(link); | |
| 245 | 248 | } |
| 246 | 249 | |
| 247 | 250 | void avfilter_draw_slice(AVFilterLink *link, int y, int h) |
| @@ -253,6 +256,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h) · 5 unmodified lines | ||
| 253 | 256 | if(link->srcpic) { |
| 254 | 257 | avcodec_get_chroma_sub_sample(link->format, &hsub, &vsub); |
| 255 | 258 | |
| 259 | + link->cur_pic->pts = link->srcpic->pts; | |
| 256 | 260 | src[0] = link->srcpic-> data[0] + y * link->srcpic-> linesize[0]; |
| 257 | 261 | dst[0] = link->cur_pic->data[0] + y * link->cur_pic->linesize[0]; |
| 258 | 262 | for(i = 1; i < 4; i ++) { |