]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/truemotion2.c
wmavoice: Use proper size in memeset().
[ffmpeg] / libavcodec / truemotion2.c
index f4e3074c281baffc233e3beca0990dcb41aa28ea..f9e607c4f784c3ac036d6e0f318d2fc9ec62536a 100644 (file)
@@ -2,20 +2,20 @@
  * Duck/ON2 TrueMotion 2 Decoder
  * Copyright (c) 2005 Konstantin Shishkov
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -64,7 +64,7 @@ typedef struct TM2Context{
 * Huffman codes for each of streams
 */
 typedef struct TM2Codes{
-    VLC vlc; ///< table for FFmpeg bitstream reader
+    VLC vlc; ///< table for Libav bitstream reader
     int bits;
     int *recode; ///< table for converting from code indexes to values
     int length;
@@ -185,8 +185,7 @@ static int tm2_build_huff_table(TM2Context *ctx, TM2Codes *code)
 
 static void tm2_free_codes(TM2Codes *code)
 {
-    if(code->recode)
-        av_free(code->recode);
+    av_free(code->recode);
     if(code->vlc.table)
         free_vlc(&code->vlc);
 }
@@ -808,9 +807,9 @@ static int decode_frame(AVCodecContext *avctx,
     }
     p->key_frame = tm2_decode_blocks(l, p);
     if(p->key_frame)
-        p->pict_type = FF_I_TYPE;
+        p->pict_type = AV_PICTURE_TYPE_I;
     else
-        p->pict_type = FF_P_TYPE;
+        p->pict_type = AV_PICTURE_TYPE_P;
 
     l->cur = !l->cur;
     *data_size = sizeof(AVFrame);
@@ -859,13 +858,10 @@ static av_cold int decode_end(AVCodecContext *avctx){
     AVFrame *pic = &l->pic;
     int i;
 
-    if(l->last)
-        av_free(l->last);
-    if(l->clast)
-        av_free(l->clast);
+    av_free(l->last);
+    av_free(l->clast);
     for(i = 0; i < TM2_NUM_STREAMS; i++)
-        if(l->tokens[i])
-            av_free(l->tokens[i]);
+        av_free(l->tokens[i]);
     if(l->Y1){
         av_free(l->Y1);
         av_free(l->U1);
@@ -881,7 +877,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
     return 0;
 }
 
-AVCodec truemotion2_decoder = {
+AVCodec ff_truemotion2_decoder = {
     "truemotion2",
     AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TRUEMOTION2,