[FFmpeg-cvslog] port FFmpeg lavc frame specificities to lavu functions.

Clément Bœsch git at videolan.org
Sun Mar 10 01:26:02 CET 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Sun Mar 10 00:34:16 2013 +0100| [586ae70ba78e023d16c0c812b05a26c7d423833b] | committer: Michael Niedermayer

port FFmpeg lavc frame specificities to lavu functions.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=586ae70ba78e023d16c0c812b05a26c7d423833b
---

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

diff --git a/libavutil/frame.c b/libavutil/frame.c
index 2e2393d..11c0aa1 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;



More information about the ffmpeg-cvslog mailing list