latm: Do not give a score for a single instance

Message ID 1417790151-2840-1-git-send-email-lu_zero@gentoo.org
State Committed
Commit da35008c314eae5a10a8c070f5185b7694c0a37e
Headers show

Commit Message

Luca Barbato Dec. 5, 2014, 2:35 p.m.
Bug-Id: 773
CC: libav-stable@libav.org
---
 libavformat/rawdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vittorio Giovara Dec. 5, 2014, 2:41 p.m. | #1
On Fri, Dec 5, 2014 at 2:35 PM, Luca Barbato <lu_zero@gentoo.org> wrote:
> Bug-Id: 773
> CC: libav-stable@libav.org
> ---
>  libavformat/rawdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
> index 09fdbc3..65cb6bb 100644
> --- a/libavformat/rawdec.c
> +++ b/libavformat/rawdec.c
> @@ -155,7 +155,7 @@ static int latm_read_probe(AVProbeData *p)
>          return AVPROBE_SCORE_EXTENSION;
>      else if (max_frames >= 3)
>          return AVPROBE_SCORE_EXTENSION / 2;
> -    else if (max_frames >= 1)
> +    else if (max_frames > 1)
>          return 1;
>      else
>          return 0;

Sample working now, thanks.
Luca Barbato Dec. 5, 2014, 3:03 p.m. | #2
On 05/12/14 15:41, Vittorio Giovara wrote:
> On Fri, Dec 5, 2014 at 2:35 PM, Luca Barbato <lu_zero@gentoo.org> wrote:
>> Bug-Id: 773
>> CC: libav-stable@libav.org
>> ---
>>   libavformat/rawdec.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
>> index 09fdbc3..65cb6bb 100644
>> --- a/libavformat/rawdec.c
>> +++ b/libavformat/rawdec.c
>> @@ -155,7 +155,7 @@ static int latm_read_probe(AVProbeData *p)
>>           return AVPROBE_SCORE_EXTENSION;
>>       else if (max_frames >= 3)
>>           return AVPROBE_SCORE_EXTENSION / 2;
>> -    else if (max_frames >= 1)
>> +    else if (max_frames > 1)
>>           return 1;
>>       else
>>           return 0;
>
> Sample working now, thanks.
>

Later I'll try to figure out why 1 is better than 25 though.

lu

Patch

diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 09fdbc3..65cb6bb 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -155,7 +155,7 @@  static int latm_read_probe(AVProbeData *p)
         return AVPROBE_SCORE_EXTENSION;
     else if (max_frames >= 3)
         return AVPROBE_SCORE_EXTENSION / 2;
-    else if (max_frames >= 1)
+    else if (max_frames > 1)
         return 1;
     else
         return 0;