]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '99404597201911de90cff2ef85f2d44176d39147'
authorHendrik Leppkes <h.leppkes@gmail.com>
Sat, 12 Sep 2015 11:30:41 +0000 (13:30 +0200)
committerHendrik Leppkes <h.leppkes@gmail.com>
Sat, 12 Sep 2015 11:30:41 +0000 (13:30 +0200)
* commit '99404597201911de90cff2ef85f2d44176d39147':
  mmaldec: fix pkt_dts determination

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
1  2 
libavcodec/mmaldec.c

diff --combined libavcodec/mmaldec.c
index a70c51b8e3336b20b61d3d5de0841b972c369870,109912997581cdd270c9fb0ac4a07ebdf0e1985c..a41a1b67be3f90d4f78214fc7799ad1ba228aa38
@@@ -2,20 -2,20 +2,20 @@@
   * MMAL Video Decoder
   * Copyright (c) 2015 Rodger Combs
   *
 - * 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
   */
  
@@@ -365,8 -365,10 +365,8 @@@ static av_cold int ffmmal_init_decoder(
              ret = AVERROR(ENOSYS);
              goto fail;
          }
 -        av_bitstream_filter_filter(ctx->bsfc, avctx, NULL, &dummy_p, &dummy_int, NULL, 0, 0);
 -    }
 -
 -    if (avctx->extradata_size) {
 +        av_bitstream_filter_filter(ctx->bsfc, avctx, "private_spspps_buf", &dummy_p, &dummy_int, NULL, 0, 0);
 +    } else if (avctx->extradata_size) {
          if ((status = mmal_format_extradata_alloc(format_in, avctx->extradata_size)))
              goto fail;
          format_in->extradata_size = avctx->extradata_size;
@@@ -453,7 -455,7 +453,7 @@@ static int ffmmal_add_packet(AVCodecCon
          if (ctx->bsfc) {
              uint8_t *tmp_data;
              int tmp_size;
 -            if ((ret = av_bitstream_filter_filter(ctx->bsfc, avctx, NULL,
 +            if ((ret = av_bitstream_filter_filter(ctx->bsfc, avctx, "private_spspps_buf",
                                                    &tmp_data, &tmp_size,
                                                    avpkt->data, avpkt->size,
                                                    avpkt->flags & AV_PKT_FLAG_KEY)) < 0)
@@@ -619,10 -621,8 +619,8 @@@ static int ffmal_copy_frame(AVCodecCont
          }
      }
  
-     if (buffer->pts != MMAL_TIME_UNKNOWN) {
-         frame->pkt_pts = buffer->pts;
-         frame->pts = buffer->pts;
-     }
+     frame->pkt_pts = buffer->pts == MMAL_TIME_UNKNOWN ? AV_NOPTS_VALUE : buffer->pts;
+     frame->pkt_dts = AV_NOPTS_VALUE;
  
  done:
      return ret;