On Sat, Apr 22, 2017 at 11:32:41PM +0000, James Almer wrote: > ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Sat Apr 22 > 20:08:42 2017 -0300| [bddb2343b6e594e312dadb5d21b408702929ae04] | committer: > James Almer > > Merge commit '061a0c14bb5767bca72e3a7227ca400de439ba09' > > * commit '061a0c14bb5767bca72e3a7227ca400de439ba09': > decode: restructure the core decoding code > > CUVID decoder adapted by wm4. > > Merged-by: James Almer <jamr...@gmail.com> > [...]
> +static int compat_decode(AVCodecContext *avctx, AVFrame *frame, > + int *got_frame, const AVPacket *pkt) > +{ > + AVCodecInternal *avci = avctx->internal; > + int ret; > + > + av_assert0(avci->compat_decode_consumed == 0); > + > + *got_frame = 0; > + avci->compat_decode = 1; > + > + if (avci->compat_decode_partial_size > 0 && > + avci->compat_decode_partial_size != pkt->size) { > + av_log(avctx, AV_LOG_ERROR, > + "Got unexpected packet size after a partial decode\n"); > + ret = AVERROR(EINVAL); > + goto finish; > + } > + > + if (!avci->compat_decode_partial_size) { > + ret = avcodec_send_packet(avctx, pkt); > + if (ret == AVERROR_EOF) > + ret = 0; > + else if (ret == AVERROR(EAGAIN)) { > + /* we fully drain all the output in each decode call, so this > should not > + * ever happen */ > + ret = AVERROR_BUG; > + goto finish; > + } else if (ret < 0) > + goto finish; > + } > + > + while (ret >= 0) { ret is uninitialized if compat_decode_partial_size != 0 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel