[FFmpeg-devel,4/4] qsvenc: use 'else' on exclusive code

Submitted by Steve Lhomme on Sept. 21, 2017, 1:52 p.m.

Details

Message ID 20170921135250.716-4-robux4@gmail.com
State New
Headers show

Commit Message

Steve Lhomme Sept. 21, 2017, 1:52 p.m.
---
 libavcodec/qsvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index bbf72e54b0..806cef5633 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1048,7 +1048,7 @@  static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
     if (ret > 0)
         ff_qsv_print_warning(avctx, ret, "Warning during encoding");
 
-    if (ret < 0) {
+    else if (ret < 0) {
         qsv_packet_release(&qsv_pkt);
         return (ret == MFX_ERR_MORE_DATA) ?
                0 : ff_qsv_print_error(avctx, ret, "Error during encoding");