diff mbox

[FFmpeg-devel,v2,1/1] avformat/dashenc: fix for segment open issue when persistent connection is enabled

Message ID 1519971757-27885-1-git-send-email-vdixit@akamai.com
State Accepted
Commit 0dd1fff1c97d6d4e4f9c485028652aa791e4a91f
Headers show

Commit Message

Dixit, Vishwanath March 2, 2018, 6:22 a.m. UTC
From: Vishwanath Dixit <vdixit@akamai.com>

---
 libavformat/dashenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeyapal, Karthick March 3, 2018, 1:21 p.m. UTC | #1
On 3/2/18 11:52 AM, vdixit@akamai.com wrote:
> From: Vishwanath Dixit <vdixit@akamai.com>

>

> ---

>  libavformat/dashenc.c | 2 +-

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

>

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

> index 83e0cff..489e458 100644

> --- a/libavformat/dashenc.c

> +++ b/libavformat/dashenc.c

> @@ -1308,7 +1308,7 @@ static int dash_write_packet(AVFormatContext *s, AVPacket *pkt)

>          flush_init_segment(s, os);

>  

>      //open the output context when the first frame of a segment is ready

> -    if (!c->single_file && !os->out) {

> +    if (!c->single_file && os->packets_written == 1) {

>          AVDictionary *opts = NULL;

>          const char *proto = avio_find_protocol_name(s->url);

>          int use_rename = proto && !strcmp(proto, "file");

Pushed.

Regards,
Karthick
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 83e0cff..489e458 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1308,7 +1308,7 @@  static int dash_write_packet(AVFormatContext *s, AVPacket *pkt)
         flush_init_segment(s, os);
 
     //open the output context when the first frame of a segment is ready
-    if (!c->single_file && !os->out) {
+    if (!c->single_file && os->packets_written == 1) {
         AVDictionary *opts = NULL;
         const char *proto = avio_find_protocol_name(s->url);
         int use_rename = proto && !strcmp(proto, "file");