]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/shorten.c
Release old pictures after a resolution change in vp5/6 decoder
[ffmpeg] / libavcodec / shorten.c
index f593d0a164167bb417c23a8e317b8172026c4aca..b39fcbd0ef35d8813e4159a41262e184fb03bb9b 100644 (file)
@@ -471,7 +471,6 @@ static int shorten_decode_frame(AVCodecContext *avctx,
                         s->cur_chan = 0;
                         goto frame_done;
                     }
-                    break;
                 }
                 break;
             case FN_VERBATIM:
@@ -489,11 +488,9 @@ static int shorten_decode_frame(AVCodecContext *avctx,
             case FN_QUIT:
                 *data_size = 0;
                 return buf_size;
-                break;
             default:
                 av_log(avctx, AV_LOG_ERROR, "unknown shorten function %d\n", cmd);
                 return -1;
-                break;
         }
     }
 frame_done:
@@ -539,14 +536,13 @@ static void shorten_flush(AVCodecContext *avctx){
 }
 
 AVCodec ff_shorten_decoder = {
-    "shorten",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_SHORTEN,
-    sizeof(ShortenContext),
-    shorten_decode_init,
-    NULL,
-    shorten_decode_close,
-    shorten_decode_frame,
+    .name           = "shorten",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_SHORTEN,
+    .priv_data_size = sizeof(ShortenContext),
+    .init           = shorten_decode_init,
+    .close          = shorten_decode_close,
+    .decode         = shorten_decode_frame,
     .flush= shorten_flush,
     .long_name= NULL_IF_CONFIG_SMALL("Shorten"),
 };