]> rtime.felk.cvut.cz Git - frescor/demo.git/commitdiff
streamer: Print '*' for every key frame
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 19 May 2010 08:43:42 +0000 (10:43 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 19 May 2010 08:43:42 +0000 (10:43 +0200)
src/recorder/ffmpeg.c

index 3a7f86abf8b66ab422ff10ae97e6fa9e601eff17..ba6a68f82b7f45f71413d960c2fa11f2d3c9f102 100644 (file)
@@ -1262,9 +1262,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
                     data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
                     /* XXX: allocate picture correctly */
                     avcodec_get_frame_defaults(&picture);
-
                     ret = avcodec_decode_video2(ist->st->codec,
                                                 &picture, &got_picture, &avpkt);
+                   if (picture.key_frame)
+                           printf("*");
                     ist->st->quality= picture.quality;
                     if (ret < 0)
                         goto fail_decode;