History

Fix timestamp handling in more filters after the change which set the timebase in the filter link.

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

Stefano Sabatini committed 16 years ago

Commit 41f1d3a1 parent a4ef9653 files · +3 −3Browse files

Unified · Split

3 files
  1. libavfilter/vf_blackframe.c +1 −1
  2. libavfilter/vf_cropdetect.c +1 −1
  3. libavfilter/vf_frei0r.c +1 −1
libavfilter/vf_blackframe.c+1−1
@@ -99,7 +99,7 @@ static void end_frame(AVFilterLink *inlink) · 98 unmodified lines
9999 if (pblack >= blackframe->bamount)
100100 av_log(ctx, AV_LOG_INFO, "frame:%u pblack:%u pos:%"PRId64" pts:%"PRId64" t:%f\n",
101101 blackframe->frame, pblack, picref->pos, picref->pts,
102− picref->pts == AV_NOPTS_VALUE ? -1 : (double)picref->pts / AV_TIME_BASE);
102+ picref->pts == AV_NOPTS_VALUE ? -1 : picref->pts * av_q2d(inlink->time_base));
103103
104104 blackframe->frame++;
105105 blackframe->nblack = 0;
libavfilter/vf_cropdetect.c+1−1
@@ -184,7 +184,7 @@ static void end_frame(AVFilterLink *inlink) · 183 unmodified lines
184184 av_log(ctx, AV_LOG_INFO,
185185 "x1:%d x2:%d y1:%d y2:%d w:%d h:%d x:%d y:%d pos:%"PRId64" pts:%"PRId64" t:%f crop=%d:%d:%d:%d\n",
186186 cd->x1, cd->x2, cd->y1, cd->y2, w, h, x, y, picref->pos, picref->pts,
187− picref->pts == AV_NOPTS_VALUE ? -1 : (double)picref->pts / AV_TIME_BASE,
187+ picref->pts == AV_NOPTS_VALUE ? -1 : picref->pts * av_q2d(inlink->time_base),
188188 w, h, x, y);
189189 }
190190
libavfilter/vf_frei0r.c+1−1
@@ -330,7 +330,7 @@ static void end_frame(AVFilterLink *inlink) · 329 unmodified lines
330330 AVFilterBufferRef *inpicref = inlink->cur_buf;
331331 AVFilterBufferRef *outpicref = outlink->out_buf;
332332
333− frei0r->update(frei0r->instance, (double)inpicref->pts / AV_TIME_BASE,
333+ frei0r->update(frei0r->instance, inpicref->pts * av_q2d(inlink->time_base) * 1000,
334334 (const uint32_t *)inpicref->data[0],
335335 (uint32_t *)outpicref->data[0]);
336336 avfilter_unref_buffer(inpicref);

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