Commit 586ae70b authored by Clément Bœsch's avatar Clément Bœsch Committed by Michael Niedermayer

port FFmpeg lavc frame specificities to lavu functions.

parent d1b456b0
......@@ -49,7 +49,13 @@ static void get_frame_defaults(AVFrame *frame)
memset(frame, 0, sizeof(*frame));
frame->pts = AV_NOPTS_VALUE;
frame->pts =
frame->pkt_dts =
frame->pkt_pts = AV_NOPTS_VALUE;
av_frame_set_best_effort_timestamp(frame, AV_NOPTS_VALUE);
av_frame_set_pkt_duration (frame, 0);
av_frame_set_pkt_pos (frame, -1);
av_frame_set_pkt_size (frame, -1);
frame->key_frame = 1;
frame->sample_aspect_ratio = (AVRational){ 0, 1 };
frame->format = -1; /* unknown */
......@@ -63,6 +69,7 @@ AVFrame *av_frame_alloc(void)
if (!frame)
return NULL;
frame->extended_data = NULL;
get_frame_defaults(frame);
return frame;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment