OSDN Git Service

Merge commit '9cbae3a7d57bd2b862c37fd8123bd1fba680e801'
authorHendrik Leppkes <h.leppkes@gmail.com>
Tue, 27 Oct 2015 13:07:36 +0000 (14:07 +0100)
committerHendrik Leppkes <h.leppkes@gmail.com>
Tue, 27 Oct 2015 13:07:36 +0000 (14:07 +0100)
* commit '9cbae3a7d57bd2b862c37fd8123bd1fba680e801':
  roqvideodec: use av_frame_copy

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

@@@ -204,14 -192,17 +204,15 @@@ static int roq_decode_frame(AVCodecCont
      const uint8_t *buf = avpkt->data;
      int buf_size = avpkt->size;
      RoqContext *s = avctx->priv_data;
-     int copy= !s->current_frame->data[0] && s->last_frame->data[0];
+     int copy = !s->current_frame->data[0] && s->last_frame->data[0];
      int ret;
  
 -    if ((ret = ff_reget_buffer(avctx, s->current_frame)) < 0) {
 -        av_log(avctx, AV_LOG_ERROR, "  RoQ: get_buffer() failed\n");
 +    if ((ret = ff_reget_buffer(avctx, s->current_frame)) < 0)
          return ret;
 -    }
  
-     if(copy) {
-         if ((ret = av_frame_copy(s->current_frame, s->last_frame)) < 0)
+     if (copy) {
+         ret = av_frame_copy(s->current_frame, s->last_frame);
+         if (ret < 0)
              return ret;
      }