[FFmpeg-devel] [PATCH] lavc/vaapi_encode_h264: add option to insert AUD nal to AVC stream

Michael Niedermayer michael at niedermayer.cc
Tue May 2 17:08:36 EEST 2017


On Tue, May 02, 2017 at 10:49:50AM +0800, Jun Zhao wrote:
>  vaapi_encode.c      |   15 +++++++++++++++
>  vaapi_encode.h      |    4 ++++
>  vaapi_encode_h264.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 64 insertions(+)
> 32cb532f5b6e7a3237b3997a79a93bf54b02660f  0001-lavc-vaapi_encode_h264-add-option-to-insert-AUD-nal-.patch
> From e39078e9fe02c8d77c5e28436aef4d80a2d7b3a0 Mon Sep 17 00:00:00 2001
> From: Jun Zhao <jun.zhao at intel.com>
> Date: Tue, 2 May 2017 10:36:55 +0800
> Subject: [PATCH] lavc/vaapi_encode_h264: add option to insert AUD nal to AVC
>  stream.
> 
> Add aud option to support insert AUD nal in AVC stream. Default is
> disable.
> 
> Signed-off-by: Jun Zhao <jun.zhao at intel.com>
> Signed-off-by: Yi A Wang <yi.a.wang at intel.com>
> ---
>  libavcodec/vaapi_encode.c      | 15 ++++++++++++++
>  libavcodec/vaapi_encode.h      |  4 ++++
>  libavcodec/vaapi_encode_h264.c | 45 ++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 64 insertions(+)
> 
> diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
> index 7e9c00f51d..77a10f98a7 100644
> --- a/libavcodec/vaapi_encode.c
> +++ b/libavcodec/vaapi_encode.c
> @@ -236,6 +236,21 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
>              goto fail;
>      }
>  
> +    if (ctx->va_packed_headers & VA_ENC_PACKED_HEADER_RAW_DATA &&
> +        ctx->codec->write_aud_header) {
> +        bit_len = 8 * sizeof(data);
> +        err = ctx->codec->write_aud_header(avctx, pic, data, &bit_len);
> +        if (err < 0) {

> +            av_log(avctx, AV_LOG_ERROR, "Failed to write aud "
> +                   "header %d: %d.\n", err);

the %d(s) and the argument doesnt match up

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170502/4fcebd42/attachment.sig>


More information about the ffmpeg-devel mailing list