On 14.06.2015 11:50, Luca Barbato wrote:
> The AVCodecContext width, height, coded_width, coded_height and format
> are used mainly as decoding hints and they get internally overwritten
> during the data parsing stage.
> 
> Do not assume they match the last AVFrame provided by
> avcodec_decode_video2 and assimilated functions since multi-threading
> and other frame reordering might make those values to refer to frames
> that will be outputted in the future.
> 
> CC: [email protected]
> ---
>  libavcodec/avcodec.h | 22 +++++++++++++++++++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 3440126..59179dd 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1217,21 +1217,31 @@ typedef struct AVCodecContext {
>      /* video only */
>      /**
>       * picture width / height.
> +     *
> +     * @note Those fields may not match the values of the last
> +     * AVFrame outputted by avcodec_decode_video2 due frame
> +     * reorderning.
> +     *

That would have worked, had it been there from the beginning,
but adding it now, after being documented differently for years,
doesn't help that much.

Best regards,
Andreas

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to