diff mbox

[FFmpeg-devel] avformat/dashenc: Format VP9 level as decimal instead of hexadecimal

Message ID 1537169235-27491-1-git-send-email-kjeyapal@akamai.com
State Accepted
Commit 7ff3d2594f9257ace9955086ccace0b36955fed3
Headers show

Commit Message

Jeyapal, Karthick Sept. 17, 2018, 7:27 a.m. UTC
From: Karthick Jeyapal <kjeyapal@akamai.com>

Commit ID 63c69d51c7532fb6c2460076329b50ec51a0f290 fixed the bug in vpcc, get_vp9_level() function, causing this change.
---
 libavformat/dashenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hendrik Leppkes Sept. 17, 2018, 7:42 a.m. UTC | #1
On Mon, Sep 17, 2018 at 9:28 AM Karthick J <kjeyapal@akamai.com> wrote:
>
> From: Karthick Jeyapal <kjeyapal@akamai.com>
>
> Commit ID 63c69d51c7532fb6c2460076329b50ec51a0f290 fixed the bug in vpcc, get_vp9_level() function, causing this change.
> ---
>  libavformat/dashenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 9a33321..f429ebc 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -211,7 +211,7 @@ static void set_vp9_codec_str(AVFormatContext *s, AVCodecParameters *par,
>      VPCC vpcc;
>      int ret = ff_isom_get_vpcc_features(s, par, frame_rate, &vpcc);
>      if (ret == 0) {
> -        av_strlcatf(str, size, "vp09.%02x.%02x.%02x",
> +        av_strlcatf(str, size, "vp09.%02x.%02d.%02x",
>                      vpcc.profile, vpcc.level, vpcc.bitdepth);
>      } else {
>          // Default to just vp9 in case of error while finding out profile or level

Shouldn't all of those be decimals, instead of hex? For profile its
never going to matter since the values are all low, but bitdepth
should be 10 instead of 0A.

- Hendrik
Jeyapal, Karthick Sept. 17, 2018, 8:05 a.m. UTC | #2
On 9/17/18 1:12 PM, Hendrik Leppkes wrote:
> On Mon, Sep 17, 2018 at 9:28 AM Karthick J <kjeyapal@akamai.com> wrote:

>>

>> From: Karthick Jeyapal <kjeyapal@akamai.com>

>>

>> Commit ID 63c69d51c7532fb6c2460076329b50ec51a0f290 fixed the bug in vpcc, get_vp9_level() function, causing this change.

>> ---

>>  libavformat/dashenc.c | 2 +-

>>  1 file changed, 1 insertion(+), 1 deletion(-)

>>

>> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c

>> index 9a33321..f429ebc 100644

>> --- a/libavformat/dashenc.c

>> +++ b/libavformat/dashenc.c

>> @@ -211,7 +211,7 @@ static void set_vp9_codec_str(AVFormatContext *s, AVCodecParameters *par,

>>      VPCC vpcc;

>>      int ret = ff_isom_get_vpcc_features(s, par, frame_rate, &vpcc);

>>      if (ret == 0) {

>> -        av_strlcatf(str, size, "vp09.%02x.%02x.%02x",

>> +        av_strlcatf(str, size, "vp09.%02x.%02d.%02x",

>>                      vpcc.profile, vpcc.level, vpcc.bitdepth);

>>      } else {

>>          // Default to just vp9 in case of error while finding out profile or level

>

> Shouldn't all of those be decimals, instead of hex? For profile its

> never going to matter since the values are all low, but bitdepth

> should be 10 instead of 0A.

You are right. I have sent another patch to fix it. 
Thanks for pointing it out.

Regards,
Karthick
>

> - Hendrik

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 9a33321..f429ebc 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -211,7 +211,7 @@  static void set_vp9_codec_str(AVFormatContext *s, AVCodecParameters *par,
     VPCC vpcc;
     int ret = ff_isom_get_vpcc_features(s, par, frame_rate, &vpcc);
     if (ret == 0) {
-        av_strlcatf(str, size, "vp09.%02x.%02x.%02x",
+        av_strlcatf(str, size, "vp09.%02x.%02d.%02x",
                     vpcc.profile, vpcc.level, vpcc.bitdepth);
     } else {
         // Default to just vp9 in case of error while finding out profile or level