OSDN Git Service

Merge commit '12251f997bbc0abb93be39c51021e6d404ca385f'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2015 22:37:50 +0000 (23:37 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Feb 2015 22:37:54 +0000 (23:37 +0100)
* commit '12251f997bbc0abb93be39c51021e6d404ca385f':
  rtpdec: Remove unnecessary checks

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/rtpdec_h263_rfc2190.c
libavformat/rtpdec_latm.c

@@@ -8,20 -8,20 +8,20 @@@
   * Copyright 2007 Collabora Ltd, Philippe Kalaf
   * Copyright 2010 Mark Nauwelaerts
   *
 - * This file is part of Libav.
 + * This file is part of FFmpeg.
   *
 - * Libav is free software; you can redistribute it and/or
 + * FFmpeg 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.
   *
 - * Libav is distributed in the hope that it will be useful,
 + * FFmpeg 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 Libav; if not, write to the Free Software
 + * License along with FFmpeg; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
   */
  
@@@ -41,8 -41,6 +41,6 @@@ struct PayloadContext 
  
  static void h263_free_context(PayloadContext *data)
  {
-     if (!data)
-         return;
      if (data->buf) {
          uint8_t *p;
          avio_close_dyn_buf(data->buf, &p);
@@@ -2,20 -2,20 +2,20 @@@
   * RTP Depacketization of MP4A-LATM, RFC 3016
   * Copyright (c) 2010 Martin Storsjo
   *
 - * This file is part of Libav.
 + * This file is part of FFmpeg.
   *
 - * Libav is free software; you can redistribute it and/or
 + * FFmpeg 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.
   *
 - * Libav is distributed in the hope that it will be useful,
 + * FFmpeg 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 Libav; if not, write to the Free Software
 + * License along with FFmpeg; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
   */
  
@@@ -33,14 -33,12 +33,12 @@@ struct PayloadContext 
  
  static void latm_free_context(PayloadContext *data)
  {
-     if (!data)
-         return;
      if (data->dyn_buf) {
          uint8_t *p;
          avio_close_dyn_buf(data->dyn_buf, &p);
          av_free(p);
      }
 -    av_free(data->buf);
 +    av_freep(&data->buf);
      av_free(data);
  }
  
@@@ -67,7 -65,7 +65,7 @@@ static int latm_parse_packet(AVFormatCo
  
          if (!(flags & RTP_FLAG_MARKER))
              return AVERROR(EAGAIN);
 -        av_free(data->buf);
 +        av_freep(&data->buf);
          data->len = avio_close_dyn_buf(data->dyn_buf, &data->buf);
          data->dyn_buf = NULL;
          data->pos = 0;
@@@ -125,7 -123,10 +123,7 @@@ static int parse_fmtp_config(AVStream *
          goto end;
      }
      av_freep(&st->codec->extradata);
 -    st->codec->extradata_size = (get_bits_left(&gb) + 7)/8;
 -    st->codec->extradata = av_mallocz(st->codec->extradata_size +
 -                                      FF_INPUT_BUFFER_PADDING_SIZE);
 -    if (!st->codec->extradata) {
 +    if (ff_alloc_extradata(st->codec, (get_bits_left(&gb) + 7)/8)) {
          ret = AVERROR(ENOMEM);
          goto end;
      }