[FFmpeg-devel] libavcodec:questions about function ff_mpeg_ref_picture, crushed when using dxva2 hwaccel.

Hendrik Leppkes h.leppkes at gmail.com
Fri Mar 22 09:55:10 CET 2013


On Fri, Mar 22, 2013 at 9:19 AM, Wei Gao <highgod0401 at gmail.com> wrote:
> 2013/3/22 Hendrik Leppkes <h.leppkes at gmail.com>
>
>> On Fri, Mar 22, 2013 at 8:19 AM, Wei Gao <highgod0401 at gmail.com> wrote:
>> > Hi,
>> >
>> > I am merging my dxva2 patch to the latest ffmpeg, and I found that the
>> h264
>> > of dxva2 wroks well and others don't (vc1 wmv3 mpeg2), I trace the code
>> and
>> > found that the function ff_mpeg_ref_picture crushed, happened code is as
>> > follows:
>> >
>> > if (src->hwaccel_picture_private) {
>> >         av_log(NULL,AV_LOG_ERROR,"src->hwaccel_picture_private\n");
>> >         dst->hwaccel_priv_buf = av_buffer_ref(src->hwaccel_priv_buf);
>> >         if (!dst->hwaccel_priv_buf)
>> >             goto fail;
>> >         dst->hwaccel_picture_private = dst->hwaccel_priv_buf->data;
>> >     }
>> >
>> > h264 doesn't run in the branch but others do. I comment out these code
>> and
>> > other video format run correct.
>> > I tried two configuerations:
>> > ./configure --disable-debug --enable-gpl --enable-avfilter
>> --enable-libx264
>> > --cpu=i686 --enable-opencl --enable-dxva2 --enable-hwaccels
>> > ./configure --disable-debug --enable-gpl --enable-avfilter
>> --enable-libx264
>> > --enable-pthreads --enable-opencl --enable-dxva2 --enable-hwaccels
>> >
>> > they are the same problem.
>> >
>> > I don't know why other video format run in the branch and what these code
>> > do?
>>
>> h264 does not use this because ff_mpeg_ref_picture is part of
>> mpegvideo, and is not used by h264 anymore.
>>
>> For the record, hwaccel works fine for me, in all codecs.
>> There have been some issues with it, but i submitted patches to fix
>> the issues and all of them are in git master now.
>>
> Hi,
> Thanks, do you set any options to your hwaccel environment? because my code
> died when run into that branch. but after I comment of it, the result is
> correct too. So what the branch implement?
>

I think your tree is out of date, rebase against latest HEAD, i
recently fixed an issue that caused a crash in this part of the code.


More information about the ffmpeg-devel mailing list