return ret;
}
- decoded_frame->pts = guess_correct_pts(&ist->pts_ctx, decoded_frame->pkt_pts,
- decoded_frame->pkt_dts);
+ if(ist->top_field_first>=0)
+ decoded_frame->top_field_first = ist->top_field_first;
+
+ best_effort_timestamp= av_frame_get_best_effort_timestamp(decoded_frame);
+ if(best_effort_timestamp != AV_NOPTS_VALUE)
+ ist->next_pts = ist->pts = av_rescale_q(decoded_frame->pts = best_effort_timestamp, ist->st->time_base, AV_TIME_BASE_Q);
+
+ if (debug_ts) {
+ av_log(NULL, AV_LOG_INFO, "decoder -> ist_index:%d type:video "
+ "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64" best_effort_ts_time:%s keyframe:%d frame_type:%d \n",
+ ist->st->index, av_ts2str(decoded_frame->pts),
+ av_ts2timestr(decoded_frame->pts, &ist->st->time_base),
+ best_effort_timestamp,
+ av_ts2timestr(best_effort_timestamp, &ist->st->time_base),
+ decoded_frame->key_frame, decoded_frame->pict_type);
+ }
+
pkt->size = 0;
+ #if FF_API_DEINTERLACE
pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free);
+ #endif
rate_emu_sleep(ist);
attribute_deprecated
int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
enum AVPixelFormat pix_fmt, int width, int height);
+ #endif
/**
- * Copy image src to dst. Wraps av_picture_data_copy() above.
+ * Copy image src to dst. Wraps av_image_copy().
*/
void av_picture_copy(AVPicture *dst, const AVPicture *src,
enum AVPixelFormat pix_fmt, int width, int height);
}
}
- void ff_h264_draw_horiz_band(H264Context *h, int y, int height)
- {
- draw_horiz_band(h->avctx, &h->cur_pic,
- h->ref_list[0][0].f.data[0] ? &h->ref_list[0][0] : NULL,
- y, height, h->picture_structure, h->first_field,
- h->low_delay);
- }
-
static void free_frame_buffer(H264Context *h, Picture *pic)
{
+ pic->period_since_free = 0;
ff_thread_release_buffer(h->avctx, &pic->f);
av_freep(&pic->f.hwaccel_picture_private);
}