[FFmpeg-trac] #11329(avformat:new): Give segfault where you don't use input datas
FFmpeg
trac at avcodec.org
Sun Dec 1 20:46:53 EET 2024
#11329: Give segfault where you don't use input datas
----------------------------------+-------------------------------------
Reporter: Rm Beer | Type: defect
Status: new | Priority: important
Component: avformat | Version: 5.1.2
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+-------------------------------------
I'm programming in C with the ffmpeg libraries, so far I can record an mp4
video without problems except for the fact that the av_write_trailer
function is giving segmentation fault on line 1253 of ./libavformat/mux.c,
as I'm seeing the The reason is because I did not use input data at any
time.
int av_write_trailer(AVFormatContext *s)
{
FFFormatContext *const si = ffformatcontext(s);
AVPacket *const pkt = si->parse_pkt; // <<<=== The segfault line
int ret1, ret = 0;
:
:
:
parse_pkt seem a temp paquet that ffmpeg are use, and it's related to the
input datas that i never use.
The bug? That ffmpeg can't support without input data.
There are cases like mine in which the input data is not necessary and
only the output data is needed, there are programs that are used only for
streaming or saving to video or audio files such as mp4. In such cases
there is no input data, it is generated by the program that the developer
creates.
The only thing I can think of is generating junk data as input data even
though I'm never going to use it. But I prefer to wait for the response
from the ffmpeg developers who know more about how it works, to see if
they have a better solution to the problem.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11329>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list