Unified · Split
| @@ -1205,7 +1205,7 @@ fail: · 1204 unmodified lines | |||
| 1205 | int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt) | 1205 | int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt) |
| 1206 | { | 1206 | { |
| 1207 | VAAPIEncodeContext *ctx = avctx->priv_data; | 1207 | VAAPIEncodeContext *ctx = avctx->priv_data; |
| 1208 | VAAPIEncodePicture *pic; | 1208 | VAAPIEncodePicture *pic = NULL; |
| 1209 | AVFrame *frame = ctx->frame; | 1209 | AVFrame *frame = ctx->frame; |
| 1210 | int err; | 1210 | int err; |
| 1211 | 1211 | ||
| @@ -1228,8 +1228,6 @@ int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt) · 16 unmodified lines | |||
| 1228 | } | 1228 | } |
| 1229 | 1229 | ||
| 1230 | if (ctx->has_sync_buffer_func) { | 1230 | if (ctx->has_sync_buffer_func) { |
| 1231 | pic = NULL; | ||
| 1232 | |||
| 1233 | if (av_fifo_can_write(ctx->encode_fifo)) { | 1231 | if (av_fifo_can_write(ctx->encode_fifo)) { |
| 1234 | err = vaapi_encode_pick_next(avctx, &pic); | 1232 | err = vaapi_encode_pick_next(avctx, &pic); |
| 1235 | if (!err) { | 1233 | if (!err) { |
| @@ -1255,7 +1253,6 @@ int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt) · 19 unmodified lines | |||
| 1255 | av_fifo_read(ctx->encode_fifo, &pic, 1); | 1253 | av_fifo_read(ctx->encode_fifo, &pic, 1); |
| 1256 | ctx->encode_order = pic->encode_order + 1; | 1254 | ctx->encode_order = pic->encode_order + 1; |
| 1257 | } else { | 1255 | } else { |
| 1258 | pic = NULL; | ||
| 1259 | err = vaapi_encode_pick_next(avctx, &pic); | 1256 | err = vaapi_encode_pick_next(avctx, &pic); |
| 1260 | if (err < 0) | 1257 | if (err < 0) |
| 1261 | return err; | 1258 | return err; |