From 586ae70ba78e023d16c0c812b05a26c7d423833b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <ubitux@gmail.com>
Date: Sun, 10 Mar 2013 00:34:16 +0100
Subject: [PATCH] port FFmpeg lavc frame specificities to lavu functions.

---
 libavutil/frame.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 2e2393d47ea..11c0aa163c5 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -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;
-- 
GitLab