Opened 4 hours ago
#11329 new defect
Give segfault where you don't use input datas
Reported by: | Rm Beer | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avformat |
Version: | 5.1.2 | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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.