]> git.sesse.net Git - ffmpeg/commitdiff
lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults
authorAnton Khirnov <anton@khirnov.net>
Fri, 21 Sep 2012 06:28:49 +0000 (08:28 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 24 Sep 2012 10:31:24 +0000 (12:31 +0200)
AVFrame is used for both audio and video, so calling the argument 'pic'
is misleading.

libavcodec/avcodec.h
libavcodec/utils.c

index c5cdf41ed369565bc27496001b6ac158c6d0ba13..2bb308f1d1d755ae2060b52eca4536cbe00e5139 100644 (file)
@@ -3267,9 +3267,9 @@ AVFrame *avcodec_alloc_frame(void);
 /**
  * Set the fields of the given AVFrame to default values.
  *
- * @param pic The AVFrame of which the fields should be set to default values.
+ * @param frame The AVFrame of which the fields should be set to default values.
  */
-void avcodec_get_frame_defaults(AVFrame *pic);
+void avcodec_get_frame_defaults(AVFrame *frame);
 
 /**
  * Initialize the AVCodecContext to use the given AVCodec. Prior to using this
index b35ef51ac036cceb4860c8fa7209fad67bacbdd8..7ef858153b6beffd28b716f98c6ec2a29549d63f 100644 (file)
@@ -633,26 +633,26 @@ enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum
     return fmt[0];
 }
 
-void avcodec_get_frame_defaults(AVFrame *pic)
+void avcodec_get_frame_defaults(AVFrame *frame)
 {
-    memset(pic, 0, sizeof(AVFrame));
+    memset(frame, 0, sizeof(AVFrame));
 
-    pic->pts                 = AV_NOPTS_VALUE;
-    pic->key_frame           = 1;
-    pic->sample_aspect_ratio = (AVRational) {0, 1 };
-    pic->format              = -1; /* unknown */
+    frame->pts                 = AV_NOPTS_VALUE;
+    frame->key_frame           = 1;
+    frame->sample_aspect_ratio = (AVRational) {0, 1 };
+    frame->format              = -1; /* unknown */
 }
 
 AVFrame *avcodec_alloc_frame(void)
 {
-    AVFrame *pic = av_malloc(sizeof(AVFrame));
+    AVFrame *frame = av_malloc(sizeof(AVFrame));
 
-    if (pic == NULL)
+    if (frame == NULL)
         return NULL;
 
-    avcodec_get_frame_defaults(pic);
+    avcodec_get_frame_defaults(frame);
 
-    return pic;
+    return frame;
 }
 
 int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)