On Tue, Jan 09, 2007 at 10:50:22AM -0000, Wolfram Gloger wrote: >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.. sizeof(duration_error) != MAX_STD_TIME_BASES*sizeof(double*) sizeof(duration_error) == sizeof(double*) Infact, it seems possibly correct ;] http://c-faq.com/aryptr/dynmuldimary.html > >I'd suggest double (*duration_error)[MAX_STREAMS] = { 0 }; >and lazy pointer initialization.. > >Regards, >Wolfram. >_______________________________________________ >ffmpeg-devel mailing list >ffmpeg-devel at mplayerhq.hu >http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
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