Skip to content
Snippets Groups Projects
Commit 078be09d authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Michael Niedermayer
Browse files

examples/demuxing_decoding: abort decoding when width, height or pix_fmt change


This is necessary, because avcodec_decode_video2 can change
width, height and/or pixel format of the AVCodecContext. Since
video_dst_data and video_dst_linesize are not updated by calling
av_image_alloc again, av_image_copy[_plane] asserts, because the
destination buffer is too small.

In this case, creating a useable rawvideo is not possible anyway, since
it has fixed width/height/pix_fmt.

Signed-off-by: default avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 06fe6dfe
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment