1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/dhav: Add missed free for end_buffer

Accidentally left out of 36ec9217e6.

Found-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis
2025-06-06 14:43:09 +01:00
parent b7fc195e7a
commit be46370941

View File

@ -281,6 +281,7 @@ static int64_t get_duration(AVFormatContext *s)
}
if (end_pos < 0 || end_pos + 16 > end_buffer_pos + end_buffer_size) {
av_freep(&end_buffer);
avio_seek(s->pb, start_pos, SEEK_SET);
return 0;
}
@ -289,6 +290,8 @@ static int64_t get_duration(AVFormatContext *s)
get_timeinfo(date, &timeinfo);
end = av_timegm(&timeinfo) * 1000LL;
av_freep(&end_buffer);
avio_seek(s->pb, start_pos, SEEK_SET);
return end - start;