diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2017-09-02 19:42:13 +0200 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2017-09-07 12:08:32 +0200 |
commit | d0961d30692ae9c4c509056544ac936b6b7177c0 (patch) | |
tree | 7fea09f5ed4eb626e772ebf7c1dc452cda047773 | |
parent | a56d0497cbab6f9abf68f77f1b4fe16c4a53f101 (diff) | |
download | ffmpeg-d0961d30692ae9c4c509056544ac936b6b7177c0.tar.gz |
avcodec/nvenc: sanitize variable names
-rw-r--r-- | libavcodec/nvenc.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index b54cb1275b..e1d3316de3 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1812,7 +1812,7 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) NVENCSTATUS nv_status; CUresult cu_res; CUcontext dummy; - NvencSurface *tmpoutsurf, *inSurf; + NvencSurface *tmp_out_surf, *in_surf; int res; NvencContext *ctx = avctx->priv_data; @@ -1829,8 +1829,8 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) return AVERROR_EOF; if (frame) { - inSurf = get_free_frame(ctx); - if (!inSurf) + in_surf = get_free_frame(ctx); + if (!in_surf) return AVERROR(EAGAIN); cu_res = dl_fn->cuda_dl->cuCtxPushCurrent(ctx->cu_context); @@ -1839,7 +1839,7 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) return AVERROR_EXTERNAL; } - res = nvenc_upload_frame(avctx, frame, inSurf); + res = nvenc_upload_frame(avctx, frame, in_surf); cu_res = dl_fn->cuda_dl->cuCtxPopCurrent(&dummy); if (cu_res != CUDA_SUCCESS) { @@ -1850,12 +1850,12 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) if (res) return res; - pic_params.inputBuffer = inSurf->input_surface; - pic_params.bufferFmt = inSurf->format; - pic_params.inputWidth = inSurf->width; - pic_params.inputHeight = inSurf->height; - pic_params.inputPitch = inSurf->pitch; - pic_params.outputBitstream = inSurf->output_surface; + pic_params.inputBuffer = in_surf->input_surface; + pic_params.bufferFmt = in_surf->format; + pic_params.inputWidth = in_surf->width; + pic_params.inputHeight = in_surf->height; + pic_params.inputPitch = in_surf->pitch; + pic_params.outputBitstream = in_surf->output_surface; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) { if (frame->top_field_first) @@ -1900,7 +1900,7 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) return nvenc_print_error(avctx, nv_status, "EncodePicture failed!"); if (frame) { - av_fifo_generic_write(ctx->output_surface_queue, &inSurf, sizeof(inSurf), NULL); + av_fifo_generic_write(ctx->output_surface_queue, &in_surf, sizeof(in_surf), NULL); timestamp_queue_enqueue(ctx->timestamp_list, frame->pts); if (ctx->initial_pts[0] == AV_NOPTS_VALUE) @@ -1912,8 +1912,8 @@ int ff_nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame) /* all the pending buffers are now ready for output */ if (nv_status == NV_ENC_SUCCESS) { while (av_fifo_size(ctx->output_surface_queue) > 0) { - av_fifo_generic_read(ctx->output_surface_queue, &tmpoutsurf, sizeof(tmpoutsurf), NULL); - av_fifo_generic_write(ctx->output_surface_ready_queue, &tmpoutsurf, sizeof(tmpoutsurf), NULL); + av_fifo_generic_read(ctx->output_surface_queue, &tmp_out_surf, sizeof(tmp_out_surf), NULL); + av_fifo_generic_write(ctx->output_surface_ready_queue, &tmp_out_surf, sizeof(tmp_out_surf), NULL); } } @@ -1924,7 +1924,7 @@ int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt) { CUresult cu_res; CUcontext dummy; - NvencSurface *tmpoutsurf; + NvencSurface *tmp_out_surf; int res; NvencContext *ctx = avctx->priv_data; @@ -1934,7 +1934,7 @@ int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt) return AVERROR(EINVAL); if (output_ready(avctx, ctx->encoder_flushing)) { - av_fifo_generic_read(ctx->output_surface_ready_queue, &tmpoutsurf, sizeof(tmpoutsurf), NULL); + av_fifo_generic_read(ctx->output_surface_ready_queue, &tmp_out_surf, sizeof(tmp_out_surf), NULL); cu_res = dl_fn->cuda_dl->cuCtxPushCurrent(ctx->cu_context); if (cu_res != CUDA_SUCCESS) { @@ -1942,7 +1942,7 @@ int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt) return AVERROR_EXTERNAL; } - res = process_output_surface(avctx, pkt, tmpoutsurf); + res = process_output_surface(avctx, pkt, tmp_out_surf); cu_res = dl_fn->cuda_dl->cuCtxPopCurrent(&dummy); if (cu_res != CUDA_SUCCESS) { @@ -1953,7 +1953,7 @@ int ff_nvenc_receive_packet(AVCodecContext *avctx, AVPacket *pkt) if (res) return res; - av_fifo_generic_write(ctx->unused_surface_queue, &tmpoutsurf, sizeof(tmpoutsurf), NULL); + av_fifo_generic_write(ctx->unused_surface_queue, &tmp_out_surf, sizeof(tmp_out_surf), NULL); } else if (ctx->encoder_flushing) { return AVERROR_EOF; } else { |