]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/nvenc: don't set profile in lossless mode
authorTimo Rothenpieler <timo@rothenpieler.org>
Thu, 5 May 2016 16:05:05 +0000 (18:05 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Fri, 6 May 2016 08:15:29 +0000 (10:15 +0200)
libavcodec/nvenc.c

index c9b40485e7d52ce70c06d360399f5cf7471dbce6..bcafc20c033e612a892b797435b32d3aae8251a1 100644 (file)
@@ -890,7 +890,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
 
         ctx->encode_config.encodeCodecConfig.h264Config.outputAUD = 1;
 
-        if (!ctx->profile) {
+        if (!ctx->profile && !lossless) {
             switch (avctx->profile) {
             case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
                 ctx->encode_config.profileGUID = NV_ENC_H264_PROFILE_HIGH_444_GUID;
@@ -910,7 +910,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
                 ctx->encode_config.profileGUID = NV_ENC_H264_PROFILE_HIGH_GUID;
                 break;
             }
-        } else {
+        } else if(!lossless) {
             if (!strcmp(ctx->profile, "high")) {
                 ctx->encode_config.profileGUID = NV_ENC_H264_PROFILE_HIGH_GUID;
                 avctx->profile = FF_PROFILE_H264_HIGH;