[FFmpeg-devel,1/1] avformat/hlsenc: fix for zero EXTINF tag duration

Submitted by Dixit, Vishwanath on March 12, 2018, 9:31 a.m.

Details

Message ID 1520847105-6574-1-git-send-email-vdixit@akamai.com
State Accepted
Commit 9c249110ea974ce213840fde5ee5a3d842fa088d
Headers show

Commit Message

Dixit, Vishwanath March 12, 2018, 9:31 a.m.
From: Vishwanath Dixit <vdixit@akamai.com>

This is the fix for bug https://trac.ffmpeg.org/ticket/7073
---
 libavformat/hlsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steven Liu March 12, 2018, 10:44 a.m.
> On 12 Mar 2018, at 17:31, vdixit@akamai.com wrote:
> 
> From: Vishwanath Dixit <vdixit@akamai.com>
> 
> This is the fix for bug https://trac.ffmpeg.org/ticket/7073
> ---
> libavformat/hlsenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 08fe0aa..7d9512b 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -2501,7 +2501,7 @@ static int hls_init(AVFormatContext *s)
>             /* Get one video stream to reference for split segments
>              * so use the first video stream index. */
>             if ((vs->has_video == 1) && (vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)) {
> -                vs->reference_stream_index = j;
> +                vs->reference_stream_index = vs->streams[j]->index;
>             }
>             vs->has_subtitle += vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE;
>         }
> -- 
> 1.9.1
> 

LGTM

Thanks
Steven
Steven Liu March 12, 2018, 3:25 p.m.
> On 12 Mar 2018, at 17:31, vdixit@akamai.com wrote:

> 

> From: Vishwanath Dixit <vdixit@akamai.com>

> 

> This is the fix for bug https://trac.ffmpeg.org/ticket/7073

> ---

> libavformat/hlsenc.c | 2 +-

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

> 

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

> index 08fe0aa..7d9512b 100644

> --- a/libavformat/hlsenc.c

> +++ b/libavformat/hlsenc.c

> @@ -2501,7 +2501,7 @@ static int hls_init(AVFormatContext *s)

>             /* Get one video stream to reference for split segments

>              * so use the first video stream index. */

>             if ((vs->has_video == 1) && (vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)) {

> -                vs->reference_stream_index = j;

> +                vs->reference_stream_index = vs->streams[j]->index;

>             }

>             vs->has_subtitle += vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE;

>         }

> -- 

> 1.9.1

> 


LGTM

Thanks
Steven



pushed


Thanks
Dixit, Vishwanath March 13, 2018, 3:59 a.m.
On 3/12/18, 8:55 PM, "刘歧" <lq@chinaffmpeg.org> wrote:

>> On 12 Mar 2018, at 17:31, vdixit@akamai.com wrote:

>> 

>> From: Vishwanath Dixit <vdixit@akamai.com>

>> 

>> This is the fix for bug https://trac.ffmpeg.org/ticket/7073

>> ---

>> libavformat/hlsenc.c | 2 +-

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

>> 

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

>> index 08fe0aa..7d9512b 100644

>> --- a/libavformat/hlsenc.c

>> +++ b/libavformat/hlsenc.c

>> @@ -2501,7 +2501,7 @@ static int hls_init(AVFormatContext *s)

>>             /* Get one video stream to reference for split segments

>>              * so use the first video stream index. */

>>             if ((vs->has_video == 1) && (vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)) {

>> -                vs->reference_stream_index = j;

>> +                vs->reference_stream_index = vs->streams[j]->index;

>>             }

>>             vs->has_subtitle += vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE;

>>         }

>> -- 

>> 1.9.1

>> 

>

>LGTM

>

>Thanks

>Steven

>

>

>

>pushed

Thank you Steven…

Patch hide | download patch | download mbox

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 08fe0aa..7d9512b 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2501,7 +2501,7 @@  static int hls_init(AVFormatContext *s)
             /* Get one video stream to reference for split segments
              * so use the first video stream index. */
             if ((vs->has_video == 1) && (vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)) {
-                vs->reference_stream_index = j;
+                vs->reference_stream_index = vs->streams[j]->index;
             }
             vs->has_subtitle += vs->streams[j]->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE;
         }