mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-23 13:09:16 +00:00
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@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a75d22445e
commit
b8ba2d3915
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue