X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Flibxvidff.c;h=1e887a2a8c4fc44b64a2c3b9f39c09e7e32bc5b5;hb=921715edffbba5db8deb26b7ad3cb583ba963d03;hp=771fc2be645068c2509b3bafa2a6dcfda93dd93b;hpb=437fb1c87d7b4b0730db97d0858b4f39fffff2a9;p=ffmpeg diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c index 771fc2be645..1e887a2a8c4 100644 --- a/libavcodec/libxvidff.c +++ b/libavcodec/libxvidff.c @@ -2,20 +2,20 @@ * Interface to xvidcore for mpeg4 encoding * Copyright (c) 2004 Adam Thayer * - * 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 */ @@ -25,9 +25,6 @@ * @author Adam Thayer (krevnik@comcast.net) */ -/* needed for mkstemp() */ -#define _XOPEN_SOURCE 600 - #include #include #include "avcodec.h" @@ -450,9 +447,9 @@ static int xvid_encode_frame(AVCodecContext *avctx, xvid_enc_frame.vol_flags = x->vol_flags; xvid_enc_frame.motion = x->me_flags; xvid_enc_frame.type = - picture->pict_type == FF_I_TYPE ? XVID_TYPE_IVOP : - picture->pict_type == FF_P_TYPE ? XVID_TYPE_PVOP : - picture->pict_type == FF_B_TYPE ? XVID_TYPE_BVOP : + picture->pict_type == AV_PICTURE_TYPE_I ? XVID_TYPE_IVOP : + picture->pict_type == AV_PICTURE_TYPE_P ? XVID_TYPE_PVOP : + picture->pict_type == AV_PICTURE_TYPE_B ? XVID_TYPE_BVOP : XVID_TYPE_AUTO; /* Pixel aspect ratio setting */ @@ -493,13 +490,13 @@ static int xvid_encode_frame(AVCodecContext *avctx, if( 0 <= xerr ) { p->quality = xvid_enc_stats.quant * FF_QP2LAMBDA; if( xvid_enc_stats.type == XVID_TYPE_PVOP ) - p->pict_type = FF_P_TYPE; + p->pict_type = AV_PICTURE_TYPE_P; else if( xvid_enc_stats.type == XVID_TYPE_BVOP ) - p->pict_type = FF_B_TYPE; + p->pict_type = AV_PICTURE_TYPE_B; else if( xvid_enc_stats.type == XVID_TYPE_SVOP ) - p->pict_type = FF_S_TYPE; + p->pict_type = AV_PICTURE_TYPE_S; else - p->pict_type = FF_I_TYPE; + p->pict_type = AV_PICTURE_TYPE_I; if( xvid_enc_frame.out_flags & XVID_KEYFRAME ) { p->key_frame = 1; if( x->quicktime_format ) @@ -527,8 +524,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); - if( avctx->extradata != NULL ) - av_freep(&avctx->extradata); + av_freep(&avctx->extradata); if( x->twopassbuffer != NULL ) { av_free(x->twopassbuffer); av_free(x->old_twopassbuffer);