summaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
authorAnshul Maheshwari <er.anshul.maheshwari@gmail.com>2014-03-21 15:59:52 +0530
committerMichael Niedermayer <michaelni@gmx.at>2014-03-21 15:21:15 +0100
commit6d25e90262e377f10716c39116e2e42938e1fad2 (patch)
tree6c2acf4508f200d65532bb26a181111825e24343 /doc/examples
parent1cd107f63792dfc008cc3b9801ecd5bbf4cd5ce5 (diff)
doc/examples/avcodec: information regarding gop_size ignored if frame->pic-type is AV_PICTURE_TYPE_I
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/avcodec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/examples/avcodec.c b/doc/examples/avcodec.c
index d56e6a480e..86727a7b48 100644
--- a/doc/examples/avcodec.c
+++ b/doc/examples/avcodec.c
@@ -375,7 +375,13 @@ static void video_encode_example(const char *filename, int codec_id)
c->height = 288;
/* frames per second */
c->time_base = (AVRational){1,25};
- c->gop_size = 10; /* emit one intra frame every ten frames */
+ /* emit one intra frame every ten frames
+ * check frame pict_type before passing frame
+ * to encoder, if frame->pict_type is AV_PICTURE_TYPE_I
+ * then gop_size is ignored and the output of encoder
+ * will always be I frame irrespective to gop_size
+ */
+ c->gop_size = 10;
c->max_b_frames = 1;
c->pix_fmt = AV_PIX_FMT_YUV420P;