Originally committed as revision 22507 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -1594,6 +1594,7 @@ static int input_request_frame(AVFilterLink *link) · 1593 unmodified lines | |||
| 1594 | av_free_packet(&pkt); | 1594 | av_free_packet(&pkt); |
| 1595 | 1595 | ||
| 1596 | picref->pts = pts; | 1596 | picref->pts = pts; |
| 1597 | picref->pos = pkt.pos; | ||
| 1597 | picref->pixel_aspect = priv->is->video_st->codec->sample_aspect_ratio; | 1598 | picref->pixel_aspect = priv->is->video_st->codec->sample_aspect_ratio; |
| 1598 | avfilter_start_frame(link, avfilter_ref_pic(picref, ~0)); | 1599 | avfilter_start_frame(link, avfilter_ref_pic(picref, ~0)); |
| 1599 | avfilter_draw_slice(link, 0, link->h, 1); | 1600 | avfilter_draw_slice(link, 0, link->h, 1); |
| @@ -1657,7 +1658,7 @@ static int output_query_formats(AVFilterContext *ctx) · 57 unmodified lines | |||
| 1657 | } | 1658 | } |
| 1658 | 1659 | ||
| 1659 | static int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame, | 1660 | static int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame, |
| 1660 | int64_t *pts) | 1661 | int64_t *pts, int64_t *pos) |
| 1661 | { | 1662 | { |
| 1662 | AVFilterPicRef *pic; | 1663 | AVFilterPicRef *pic; |
| 1663 | 1664 | ||
| @@ -1669,6 +1670,7 @@ static int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame, · 5 unmodified lines | |||
| 1669 | 1670 | ||
| 1670 | frame->opaque = pic; | 1671 | frame->opaque = pic; |
| 1671 | *pts = pic->pts; | 1672 | *pts = pic->pts; |
| 1673 | *pos = pic->pos; | ||
| 1672 | 1674 | ||
| 1673 | memcpy(frame->data, pic->data, sizeof(frame->data)); | 1675 | memcpy(frame->data, pic->data, sizeof(frame->data)); |
| 1674 | memcpy(frame->linesize, pic->linesize, sizeof(frame->linesize)); | 1676 | memcpy(frame->linesize, pic->linesize, sizeof(frame->linesize)); |
| @@ -1695,7 +1697,7 @@ static int video_thread(void *arg) · 20 unmodified lines | |||
| 1695 | { | 1697 | { |
| 1696 | VideoState *is = arg; | 1698 | VideoState *is = arg; |
| 1697 | AVFrame *frame= avcodec_alloc_frame(); | 1699 | AVFrame *frame= avcodec_alloc_frame(); |
| 1698 | int64_t pts_int; | 1700 | int64_t pts_int, pos; |
| 1699 | double pts; | 1701 | double pts; |
| 1700 | int ret; | 1702 | int ret; |
| 1701 | 1703 | ||
| @@ -1748,7 +1750,7 @@ static int video_thread(void *arg) · 46 unmodified lines | |||
| 1748 | while (is->paused && !is->videoq.abort_request) | 1750 | while (is->paused && !is->videoq.abort_request) |
| 1749 | SDL_Delay(10); | 1751 | SDL_Delay(10); |
| 1750 | #if CONFIG_AVFILTER | 1752 | #if CONFIG_AVFILTER |
| 1751 | ret = get_filtered_video_frame(filt_out, frame, &pts_int); | 1753 | ret = get_filtered_video_frame(filt_out, frame, &pts_int, &pos); |
| 1752 | #else | 1754 | #else |
| 1753 | ret = get_video_frame(is, frame, &pts_int, &pkt); | 1755 | ret = get_video_frame(is, frame, &pts_int, &pkt); |
| 1754 | #endif | 1756 | #endif |
| @@ -1761,7 +1763,7 @@ static int video_thread(void *arg) · 6 unmodified lines | |||
| 1761 | pts = pts_int*av_q2d(is->video_st->time_base); | 1763 | pts = pts_int*av_q2d(is->video_st->time_base); |
| 1762 | 1764 | ||
| 1763 | #if CONFIG_AVFILTER | 1765 | #if CONFIG_AVFILTER |
| 1764 | ret = output_picture2(is, frame, pts, -1); /* fixme: unknown pos */ | 1766 | ret = output_picture2(is, frame, pts, pos); |
| 1765 | #else | 1767 | #else |
| 1766 | ret = output_picture2(is, frame, pts, pkt.pos); | 1768 | ret = output_picture2(is, frame, pts, pkt.pos); |
| 1767 | av_free_packet(&pkt); | 1769 | av_free_packet(&pkt); |