Guest User

Untitled

a guest
Nov 8th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.16 KB | None | 0 0
  1. if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) {
  2.         ret = ff_thread_decode_frame(avctx, frame, &got_frame, pkt);
  3.     } else {
  4.         av_log(NULL, AV_LOG_INFO, "decode_simple_internal() here0\n");
  5.         ret = avctx->codec->decode(avctx, frame, &got_frame, pkt);
  6.  
  7.         if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
  8.             frame->pkt_dts = pkt->dts;
  9.         if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
  10.             if(!avctx->has_b_frames)
  11.                 frame->pkt_pos = pkt->pos;
  12.             //FIXME these should be under if(!avctx->has_b_frames)
  13.             /* get_buffer is supposed to set frame parameters */
  14.             if (!(avctx->codec->capabilities & AV_CODEC_CAP_DR1)) {
  15.                 if (!frame->sample_aspect_ratio.num)  frame->sample_aspect_ratio = avctx->sample_aspect_ratio;
  16.                 if (!frame->width)                    frame->width               = avctx->width;
  17.                 if (!frame->height)                   frame->height              = avctx->height;
  18.                 if (frame->format == AV_PIX_FMT_NONE) frame->format              = avctx->pix_fmt;
  19.             }
  20.         }
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment