[FFmpeg-devel] [PATCH 1/2] examples/demuxing_decoding: abort decoding when width, height or pix_fmt change

Michael Niedermayer michaelni at gmx.at
Tue Feb 10 03:33:59 CET 2015


On Sat, Jan 31, 2015 at 11:14:54PM +0100, Andreas Cadhalpun wrote:
> Hi,
> 
> On 31.01.2015 22:19, Hendrik Leppkes wrote:
> >Since this is an example, there should maybe be a more descriptive error
> >message and a comment to mention why its done, and how one would usually go
> >about adapting to these changes?
> 
> That's a good idea. Do you think the attached patch is sufficient or
> can you suggest a better wording?
> 
> Best regards,
> Andreas
> 

>  demuxing_decoding.c |   26 ++++++++++++++++++++++----
>  1 file changed, 22 insertions(+), 4 deletions(-)
> 2ed3aa090514af92ad6dd9549a5a9446e02ce5d2  examples-demuxing_decoding-abort-decoding-when-width.patch
> From 090e0fb14f3e4741c46fdd97cdcf3c0c7c922f39 Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> Date: Sat, 31 Jan 2015 20:36:07 +0100
> Subject: [PATCH] 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.

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150210/7f865886/attachment.asc>


More information about the ffmpeg-devel mailing list