[FFmpeg-cvslog] avformat/utils: End probing if the expected codec surpasses AVPROBE_SCORE_STREAM_RETRY

2016-09-28 Thread Michael Niedermayer
ffmpeg | branch: release/3.1 | Michael Niedermayer  | 
Sat Aug 27 01:12:49 2016 +0200| [ba642f031906b89566c60426cd2c0ffcd43072ea] | 
committer: Michael Niedermayer

avformat/utils: End probing if the expected codec surpasses 
AVPROBE_SCORE_STREAM_RETRY

Fixes Ticket5800

Signed-off-by: Michael Niedermayer 
(cherry picked from commit c75273310cf1becffee79bab0e2bba0b1606afb7)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba642f031906b89566c60426cd2c0ffcd43072ea
---

 libavformat/utils.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index f470c79..1711bef 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -307,7 +307,7 @@ static int set_codec_from_probe_data(AVFormatContext *s, 
AVStream *st,
 int score;
 AVInputFormat *fmt = av_probe_input_format3(pd, 1, );
 
-if (fmt && st->request_probe <= score) {
+if (fmt) {
 int i;
 av_log(s, AV_LOG_DEBUG,
"Probe with size=%d, packets=%d detected %s with score=%d\n",
@@ -318,6 +318,9 @@ static int set_codec_from_probe_data(AVFormatContext *s, 
AVStream *st,
 if (fmt_id_type[i].type != AVMEDIA_TYPE_AUDIO &&
 st->codecpar->sample_rate)
 continue;
+if (st->request_probe > score &&
+st->codecpar->codec_id != fmt_id_type[i].id)
+continue;
 st->codecpar->codec_id   = fmt_id_type[i].id;
 st->codecpar->codec_type = fmt_id_type[i].type;
 st->internal->need_context_update = 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/utils: End probing if the expected codec surpasses AVPROBE_SCORE_STREAM_RETRY

2016-09-04 Thread Michael Niedermayer
ffmpeg | branch: release/3.0 | Michael Niedermayer  | 
Sat Aug 27 01:12:49 2016 +0200| [1b47c278a606f1bef198b6a7746edc70e0e7d84d] | 
committer: Michael Niedermayer

avformat/utils: End probing if the expected codec surpasses 
AVPROBE_SCORE_STREAM_RETRY

Fixes Ticket5800

Signed-off-by: Michael Niedermayer 
(cherry picked from commit c75273310cf1becffee79bab0e2bba0b1606afb7)
Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b47c278a606f1bef198b6a7746edc70e0e7d84d
---

 libavformat/utils.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 542ded7..fbc9a68 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -297,7 +297,7 @@ static int set_codec_from_probe_data(AVFormatContext *s, 
AVStream *st,
 int score;
 AVInputFormat *fmt = av_probe_input_format3(pd, 1, );
 
-if (fmt && st->request_probe <= score) {
+if (fmt) {
 int i;
 av_log(s, AV_LOG_DEBUG,
"Probe with size=%d, packets=%d detected %s with score=%d\n",
@@ -305,6 +305,9 @@ static int set_codec_from_probe_data(AVFormatContext *s, 
AVStream *st,
fmt->name, score);
 for (i = 0; fmt_id_type[i].name; i++) {
 if (!strcmp(fmt->name, fmt_id_type[i].name)) {
+if (st->request_probe > score &&
+st->codec->codec_id != fmt_id_type[i].id)
+continue;
 st->codec->codec_id   = fmt_id_type[i].id;
 st->codec->codec_type = fmt_id_type[i].type;
 return score;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog


[FFmpeg-cvslog] avformat/utils: End probing if the expected codec surpasses AVPROBE_SCORE_STREAM_RETRY

2016-08-26 Thread Michael Niedermayer
ffmpeg | branch: master | Michael Niedermayer  | Sat 
Aug 27 01:12:49 2016 +0200| [c75273310cf1becffee79bab0e2bba0b1606afb7] | 
committer: Michael Niedermayer

avformat/utils: End probing if the expected codec surpasses 
AVPROBE_SCORE_STREAM_RETRY

Fixes Ticket5800

Signed-off-by: Michael Niedermayer 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c75273310cf1becffee79bab0e2bba0b1606afb7
---

 libavformat/utils.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index d7f3c7a..ba08792 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -307,7 +307,7 @@ static int set_codec_from_probe_data(AVFormatContext *s, 
AVStream *st,
 int score;
 AVInputFormat *fmt = av_probe_input_format3(pd, 1, );
 
-if (fmt && st->request_probe <= score) {
+if (fmt) {
 int i;
 av_log(s, AV_LOG_DEBUG,
"Probe with size=%d, packets=%d detected %s with score=%d\n",
@@ -318,6 +318,9 @@ static int set_codec_from_probe_data(AVFormatContext *s, 
AVStream *st,
 if (fmt_id_type[i].type != AVMEDIA_TYPE_AUDIO &&
 st->codecpar->sample_rate)
 continue;
+if (st->request_probe > score &&
+st->codecpar->codec_id != fmt_id_type[i].id)
+continue;
 st->codecpar->codec_id   = fmt_id_type[i].id;
 st->codecpar->codec_type = fmt_id_type[i].type;
 st->internal->need_context_update = 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog