[FFmpeg-devel] [PATCH] lavc/vaapi_encode_h264: add option to insert AUD nal to AVC stream
Jun Zhao
mypopydev at gmail.com
Wed May 3 05:53:12 EEST 2017
On 2017/5/2 22:08, Michael Niedermayer wrote:
> 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
will fix in the V2 patch, tks.
>
> [...]
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list