A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://ffmpeg.org/pipermail/ffmpeg-devel/2007-January/027196.html below:

[Ffmpeg-devel] ffplay broken in latest svn

[Ffmpeg-devel] ffplay broken in latest svnWolfram Gloger wmglo
Tue Jan 9 11:50:22 CET 2007
Hi,

> --- libavformat/utils.c.orig	Tue Jan  2 22:35:46 2007
> +++ libavformat/utils.c	Tue Jan  9 11:54:36 2007
> @@ -1784,7 +1784,7 @@ int av_find_stream_info(AVFormatContext 
>      AVPacketList *pktl=NULL, **ppktl;
>      int64_t last_dts[MAX_STREAMS];
>      int duration_count[MAX_STREAMS]={0};
> -    double duration_error[MAX_STREAMS][MAX_STD_TIMEBASES]={{0}}; //FIXME malloc()?
> +    double (*duration_error)[MAX_STD_TIMEBASES] = av_mallocz(MAX_STREAMS * MAX_STD_TIMEBASES * sizeof(duration_error));

Ahem, this, without any further pointer initialization, cannot
possibly be correct, the first duration_error[i][j] dereference will
crash, also I think the sizeof(duration_error) (==
MAX_STD_TIME_BASES*sizeof(double*) in this case) is probably
unintentionally large..

I'd suggest double (*duration_error)[MAX_STREAMS] = { 0 };
and lazy pointer initialization..

Regards,
Wolfram.


More information about the ffmpeg-devel mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4