lists.ffmpeg.org
Sign In
Sign Up
Manage this list
Sign In
Sign Up
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
ffmpeg-cvslog
Thread
Start a new thread
Download
Threads by
month
----- 2026 -----
October
September
August
July
June
May
April
March
February
January
----- 2025 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2024 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2023 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2022 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2021 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2020 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2019 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2018 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2017 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2016 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2015 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2014 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2013 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2012 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2011 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2010 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2009 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2008 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2007 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2006 -----
December
November
October
September
August
July
June
May
April
March
February
January
----- 2005 -----
December
November
October
September
August
July
June
May
April
ffmpeg-cvslog@ffmpeg.org
April 2012
11 participants
923 discussions
The lt and lte functions were swapped.
by git@videolan.org
01 Apr '12
01 Apr '12
ffmpeg | branch: master | maxlazarov <mlazarov(a)gmail.com> | Fri Mar 30 11:23:36 2012 -0700| [7a3df014b9ba134aff85cb2778daebd497d8c79a] | committer: Michael Niedermayer The lt and lte functions were swapped. >
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7a3df014b9ba134af…
--- libavutil/eval.c | 4 ++-- tests/ref/fate/eval | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavutil/eval.c b/libavutil/eval.c index 43c70f3..ceae2ed 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -378,8 +378,8 @@ static int parse_primary(AVExpr **e, Parser *p) else if (strmatch(next, "eq" )) d->type = e_eq; else if (strmatch(next, "gte" )) d->type = e_gte; else if (strmatch(next, "gt" )) d->type = e_gt; - else if (strmatch(next, "lte" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gt; } - else if (strmatch(next, "lt" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gte; } + else if (strmatch(next, "lte" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gte; } + else if (strmatch(next, "lt" )) { AVExpr *tmp = d->param[1]; d->param[1] = d->param[0]; d->param[0] = tmp; d->type = e_gt; } else if (strmatch(next, "ld" )) d->type = e_ld; else if (strmatch(next, "isnan" )) d->type = e_isnan; else if (strmatch(next, "st" )) d->type = e_st; diff --git a/tests/ref/fate/eval b/tests/ref/fate/eval index 67b107a..1931650 100644 --- a/tests/ref/fate/eval +++ b/tests/ref/fate/eval @@ -95,16 +95,16 @@ Evaluating 'st(1, 123); ld(1)' 'st(1, 123); ld(1)' -> 123.000000 Evaluating 'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 4950.000000 +'st(0, 1); while(lte(ld(0), 100), st(1, ld(1)+ld(0));st(0, ld(0)+1)); ld(1)' -> 5050.000000 Evaluating 'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 144.000000 +'st(1, 1); st(2, 2); st(0, 1); while(lte(ld(0),10), st(3, ld(1)+ld(2)); st(1, ld(2)); st(2, ld(3)); st(0, ld(0)+1)); ld(3)' -> 233.000000 Evaluating 'while(0, 10)' 'while(0, 10)' -> nan Evaluating 'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 100.000000 +'st(0, 1); while(lte(ld(0),100), st(1, ld(1)+ld(0)); st(0, ld(0)+1))' -> 101.000000 Evaluating 'isnan(1)' 'isnan(1)' -> 0.000000
1
0
0
0
avidec: better NI detection.
by git@videolan.org
01 Apr '12
01 Apr '12
ffmpeg | branch: master | Michael Niedermayer <michaelni(a)gmx.at> | Sun Apr 1 09:49:32 2012 +0200| [8df774be88c347c40f1b2411ed9e391dfec0ebb7] | committer: Michael Niedermayer avidec: better NI detection. The new code detects NI avis by analyzing the index. Signed-off-by: Michael Niedermayer <michaelni(a)gmx.at> >
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8df774be88c347c40…
--- libavformat/avidec.c | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 9607828..0067ff9 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1292,6 +1292,8 @@ static int guess_ni_flag(AVFormatContext *s){ int64_t last_start=0; int64_t first_end= INT64_MAX; int64_t oldpos= avio_tell(s->pb); + int *idx; + int64_t min_pos, pos; for(i=0; i<s->nb_streams; i++){ AVStream *st = s->streams[i]; @@ -1315,7 +1317,32 @@ static int guess_ni_flag(AVFormatContext *s){ first_end= st->index_entries[n-1].pos; } avio_seek(s->pb, oldpos, SEEK_SET); - return last_start > first_end; + if (last_start > first_end) + return 1; + idx= av_mallocz(sizeof(*idx) * s->nb_streams); + for (min_pos=pos=0; min_pos!=INT64_MAX; pos= min_pos+1) { + int64_t max_dts = INT64_MIN/2, min_dts= INT64_MAX/2; + min_pos = INT64_MAX; + + for (i=0; i<s->nb_streams; i++) { + AVStream *st = s->streams[i]; + int n= st->nb_index_entries; + while (idx[i]<n && st->index_entries[idx[i]].pos < pos) + idx[i]++; + if (idx[i] < n) { + min_dts = FFMIN(min_dts, av_rescale_q(st->index_entries[idx[i]].timestamp, st->time_base, AV_TIME_BASE_Q)); + min_pos = FFMIN(min_pos, st->index_entries[idx[i]].pos); + } + if (idx[i]) + max_dts = FFMAX(max_dts, av_rescale_q(st->index_entries[idx[i]-1].timestamp, st->time_base, AV_TIME_BASE_Q)); + } + if(max_dts - min_dts > 2*AV_TIME_BASE) { + av_free(idx); + return 1; + } + } + av_free(idx); + return 0; } static int avi_load_index(AVFormatContext *s)
1
0
0
0
lavc: check media type of the decoder before calling it.
by git@videolan.org
01 Apr '12
01 Apr '12
ffmpeg | branch: master | Michael Niedermayer <michaelni(a)gmx.at> | Sun Apr 1 02:57:27 2012 +0200| [7c9d69360cd29415591816b70e722235a4319e08] | committer: Michael Niedermayer lavc: check media type of the decoder before calling it. This fixes a segfault where a video decoder was called from avcodec_decode_audio*(). Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni(a)gmx.at> >
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c9d69360cd294155…
--- libavcodec/utils.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 9c662c2..e63878d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1404,6 +1404,11 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi // copy to ensure we do not change avpkt AVPacket tmp = *avpkt; + if (avctx->codec->type != AVMEDIA_TYPE_VIDEO) { + av_log(avctx, AV_LOG_ERROR, "Invalid media type for video\n"); + return AVERROR(EINVAL); + } + *got_picture_ptr= 0; if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx)) return -1; @@ -1513,6 +1518,10 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "invalid packet: NULL data, size != 0\n"); return AVERROR(EINVAL); } + if (avctx->codec->type != AVMEDIA_TYPE_AUDIO) { + av_log(avctx, AV_LOG_ERROR, "Invalid media type for audio\n"); + return AVERROR(EINVAL); + } if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) { av_packet_split_side_data(avpkt); @@ -1536,6 +1545,11 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, { int ret; + if (avctx->codec->type != AVMEDIA_TYPE_SUBTITLE) { + av_log(avctx, AV_LOG_ERROR, "Invalid media type for subtitles\n"); + return AVERROR(EINVAL); + } + avctx->pkt = avpkt; *got_sub_ptr = 0; avcodec_get_subtitle_defaults(sub);
1
0
0
0
← Newer
1
...
90
91
92
93
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Results per page:
10
25
50
100
200