Opened 6 years ago

Closed 6 years ago

#3742 closed defect (fixed)

Assertion when playing h264 with vlc using vdpau

Reported by: oromit Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: h264 vdpau crash abort regression patch
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


When playing any h264 video in vlc(tested with version 2.1.4) using vdpau hwaccel, it aborts with the following assertion:

Assertion desc->flags & (1 << 4) failed at libavcodec/utils.c:722

Bisecting the issue ended up on the following two commits:


Playing h264 without vdpau acceleration works fine in vlc.
So does playing it with ffplay.
Also using the ffmpeg cli util with hwaccel vdpau works fine.

Change History (6)

comment:1 Changed 6 years ago by cehoyos

  • Keywords crash abort regression added
  • Priority changed from normal to important

Which FFmpeg version did you test / is this reproducible with current FFmpeg git head?

comment:2 Changed 6 years ago by oromit

Yes, it still happens on current git master, which is where i first noticed it.
I then went backwards until i found a commit that still worked, and then bisected between those, with the result i already posted.

comment:3 Changed 6 years ago by michael

Can someone try if patch below fixes it:

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 9e11038..2a67f4d 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
                 p->result = ff_get_buffer(p->avctx, p->requested_frame, p->requested_flags);
             case STATE_GET_FORMAT:
-                p->result_format = p->avctx->get_format(p->avctx, p->available_formats);
+                p->result_format = ff_get_format(p->avctx, p->available_formats);
                 call_done = 0;

comment:4 Changed 6 years ago by michael

  • Keywords patch added

comment:5 Changed 6 years ago by oromit

Yes, with this patch applied to the current ffmpeg master VLC 2.1.4 can play video with VDPAU acceleration again.

comment:6 Changed 6 years ago by michael

  • Resolution set to fixed
  • Status changed from new to closed

Patch applied

Fixed in e36916a63f6fd0644461ecbd6b08eeb8dfab60ab

thanks for testing

Note: See TracTickets for help on using tickets.