mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-04 14:22:12 +00:00
fftools/ffmpeg: Fix crash when flushing non-fully setup output stream
The output stream's packet may not have been allocated at that point. This happens when quitting in the following command line: $ ./ffmpeg -lavfi abuffer=sample_fmt=u8:sample_rate=48000:channel_layout=stereo -f null - Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
6d72126e9b
commit
fb215798c7
@ -1981,6 +1981,9 @@ static void flush_encoders(void)
|
||||
AVPacket *pkt = ost->pkt;
|
||||
int pkt_size;
|
||||
|
||||
if (!pkt)
|
||||
break;
|
||||
|
||||
switch (enc->codec_type) {
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
desc = "audio";
|
||||
|
Loading…
Reference in New Issue
Block a user