Re: [FFmpeg-devel] [PATCH] examples/encode_video: add log

2017-05-23 Thread Michael Niedermayer
On Tue, May 23, 2017 at 12:28:33PM +0200, Stefano Sabatini wrote:
> This helps to visualize how the send/receive API works.
> ---
>  doc/examples/encode_video.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)

LGTM

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] examples/encode_video: add log

2017-05-23 Thread Stefano Sabatini
This helps to visualize how the send/receive API works.
---
 doc/examples/encode_video.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/examples/encode_video.c b/doc/examples/encode_video.c
index d2075c1..107bea2 100644
--- a/doc/examples/encode_video.c
+++ b/doc/examples/encode_video.c
@@ -42,6 +42,9 @@ static void encode(AVCodecContext *enc_ctx, AVFrame *frame, 
AVPacket *pkt,
 int ret;
 
 /* send the frame to the encoder */
+if (frame)
+printf("Send frame %3"PRId64"\n", frame->pts);
+
 ret = avcodec_send_frame(enc_ctx, frame);
 if (ret < 0) {
 fprintf(stderr, "Error sending a frame for encoding\n");
@@ -57,7 +60,7 @@ static void encode(AVCodecContext *enc_ctx, AVFrame *frame, 
AVPacket *pkt,
 exit(1);
 }
 
-printf("Write frame %3"PRId64" (size=%5d)\n", pkt->pts, pkt->size);
+printf("Write packet %3"PRId64" (size=%5d)\n", pkt->pts, pkt->size);
 fwrite(pkt->data, 1, pkt->size, outfile);
 av_packet_unref(pkt);
 }
-- 
1.9.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel