[FFmpeg-cvslog] lavc/dxva2_h264: Fix incorrect assert statement.

Matt Oliver protogonoi at gmail.com
Wed Mar 16 12:55:09 CET 2016


On 16 March 2016 at 22:32, Clément Bœsch <u at pkh.me> wrote:

> On Wed, Mar 16, 2016 at 12:31:35PM +0100, Matt Oliver wrote:
> > ffmpeg | branch: master | Matt Oliver <protogonoi at gmail.com> | Wed Mar
> 16 22:28:29 2016 +1100| [109dfed7fc265f3e071854d5e6de5dd7f82ff9fb] |
> committer: Matt Oliver
> >
> > lavc/dxva2_h264: Fix incorrect assert statement.
> >
> > Signed-off-by: Matt Oliver <protogonoi at gmail.com>
> >
> > >
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=109dfed7fc265f3e071854d5e6de5dd7f82ff9fb
> > ---
> >
> >  libavcodec/dxva2_h264.c |    7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
> > index 61cce3a..54f2b80 100644
> > --- a/libavcodec/dxva2_h264.c
> > +++ b/libavcodec/dxva2_h264.c
> > @@ -426,7 +426,12 @@ static int
> commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
> >          slice_data = ctx_pic->slice_long;
> >          slice_size = ctx_pic->slice_count *
> sizeof(*ctx_pic->slice_long);
> >      }
> > -    assert((bs->DataSize & 127) == 0);
> > +#if CONFIG_D3D11VA
> > +    assert((((D3D11_VIDEO_DECODER_BUFFER_DESC *)bs)->DataSize & 127) ==
> 0);
> > +#endif
> > +#if CONFIG_DXVA2
> > +    assert((((DXVA2_DecodeBufferDesc *)bs)->DataSize & 127) == 0);
> > +#endif
>
> please use av_assert*


My apologies, I just modified the existing assert usage so that it doesnt
generate a compile error (which I thought was a rather trivial patch).
There are other uses of assert instead of av_assert in the same file, do
you want an additional patch that changes all uses (although im sure there
are many other locations that use assert still)


More information about the ffmpeg-cvslog mailing list