[FFmpeg-cvslog] examples/decoding_encoding: Use the AVFrame width/ height for processing images after decoding
Michael Niedermayer
git at videolan.org
Sat Jun 13 02:21:59 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jun 10 22:00:30 2015 +0200| [b8ba2d3915b3e74990c73b2671290d7ad312513e] | committer: Michael Niedermayer
examples/decoding_encoding: Use the AVFrame width/height for processing images after decoding
This is what FFmpeg / FFplay do and it is more robust
Reviewed-by: Stefano Sabatini <stefasab at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8ba2d3915b3e74990c73b2671290d7ad312513e
---
doc/examples/decoding_encoding.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/examples/decoding_encoding.c b/doc/examples/decoding_encoding.c
index 80da664..f6643f6 100644
--- a/doc/examples/decoding_encoding.c
+++ b/doc/examples/decoding_encoding.c
@@ -521,7 +521,7 @@ static int decode_write_frame(const char *outfilename, AVCodecContext *avctx,
/* the picture is allocated by the decoder, no need to free it */
snprintf(buf, sizeof(buf), outfilename, *frame_count);
pgm_save(frame->data[0], frame->linesize[0],
- avctx->width, avctx->height, buf);
+ frame->width, frame->height, buf);
(*frame_count)++;
}
if (pkt->data) {
More information about the ffmpeg-cvslog
mailing list