Opened 10 months ago

Last modified 7 months ago

#10907 new defect

Assertion pkt failed at fftools/ffmpeg_dec.c:710 - crash when transcoding av1 (libdav1d) -> h264 (libx264)

Reported by: azhelev Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: azhelev Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I am trying to transcode av1 (libdav1d) to h264 (libx264) video. ffmpeg terminated with SIGABRT and dumped core

Assertion pkt failed at fftools/ffmpeg_dec.c:710

How to reproduce:

$ ffmpeg -i 8c15d2570816542b10dc84df63d06cbf -vf scale=-2:234 -preset ultrafast 8c15d2570816542b10dc84df63d06cbf_avc.mp4

ffmpeg version N-114162-g2129d66a66
built on 14.03.2024

report file, gdb and valgrind output attached.

Attachments (4)

ffmpeg-20240314-163848-gdb.log (34.8 KB ) - added by azhelev 10 months ago.
gdb output
ffmpeg-20240314-163848-valgrind.log (6.1 KB ) - added by azhelev 10 months ago.
valgrind output
ffmpeg-20240314-163848.log.xz.partaa (2.0 MB ) - added by azhelev 10 months ago.
ffmpeg report log (part a)
ffmpeg-20240314-163848.log.xz.partab (1.3 MB ) - added by azhelev 10 months ago.
ffmpeg report log (part b)

Change History (8)

by azhelev, 10 months ago

gdb output

by azhelev, 10 months ago

valgrind output

by azhelev, 10 months ago

ffmpeg report log (part a)

by azhelev, 10 months ago

ffmpeg report log (part b)

comment:1 by azhelev, 10 months ago

To reconstruct the ffmpeg report log archive

cat ffmpeg-20240314-163848.log.xz.parta* > ffmpeg-20240314-163848.log.xz

comment:2 by James, 10 months ago

Can you share the input file?

Also, please test the following patch:

diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 597944d88d..703e14eece 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -375,7 +375,7 @@ static int libdav1d_receive_frame_internal(AVCodecContext *c, Dav1dPicture *p)
         } else {
             av_packet_free(&pkt);
             if (res >= 0)
-                return AVERROR(EAGAIN);
+                return 1;
         }
     }

comment:3 by azhelev, 10 months ago

I have uploaded the file on streams.videolan.org/upload/ with this ticket number as reference.

The filename is

8c15d2570816542b10dc84df63d06cbf_crash_when_transcoding_to_h264.mp4

I also tried the patch but got the same crash.

comment:4 by Steffen Roller, 7 months ago

I reported a similar issue in https://trac.ffmpeg.org/ticket/11067

Note: See TracTickets for help on using tickets.