Opened 8 years ago

Closed 8 years ago

#3742 closed defect (fixed)

Assertion when playing h264 with vlc using vdpau

Reported by: Timo R. 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 by Carl Eugen Hoyos, 8 years ago

Keywords: crash abort regression added
Priority: normalimportant

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

comment:2 by Timo R., 8 years ago

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 by Michael Niedermayer, 8 years ago

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 by Michael Niedermayer, 8 years ago

Keywords: patch added

comment:5 by Timo R., 8 years ago

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

comment:6 by Michael Niedermayer, 8 years ago

Resolution: fixed
Status: newclosed

Patch applied

Fixed in e36916a63f6fd0644461ecbd6b08eeb8dfab60ab

thanks for testing

Note: See TracTickets for help on using tickets.