OSDN Git Service

examples/encode_video: set the framerate
authorAnton Khirnov <anton@khirnov.net>
Thu, 20 Oct 2016 09:03:20 +0000 (11:03 +0200)
committerAnton Khirnov <anton@khirnov.net>
Wed, 2 Nov 2016 09:19:37 +0000 (10:19 +0100)
doc/examples/encode_video.c

index c5f3853..b955cce 100644 (file)
@@ -69,7 +69,9 @@ int main(int argc, char **argv)
     c->width = 352;
     c->height = 288;
     /* frames per second */
-    c->time_base= (AVRational){1,25};
+    c->time_base = (AVRational){1, 25};
+    c->framerate = (AVRational){25, 1};
+
     c->gop_size = 10; /* emit one intra frame every ten frames */
     c->max_b_frames=1;
     c->pix_fmt = AV_PIX_FMT_YUV420P;