]> granicus.if.org Git - handbrake/commitdiff
muxavformat: fix use of deprecated AVFormat.filename
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 13 Jun 2018 15:01:55 +0000 (08:01 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 13 Jun 2018 15:01:55 +0000 (08:01 -0700)
The new way is AVFormat.url. AVFormat.filename had lenght limitations
that url does not since it is allocated by the caller (and freed by
libavformat).

libhb/muxavformat.c

index 0e5d6f8bad63143cf2047e508a39e23b92a86980..d4f94356a3d4cd77421b9a73eb36e2b98a69d24c 100644 (file)
@@ -182,7 +182,7 @@ static int avformatInit( hb_mux_object_t * m )
         hb_error("Could not guess output format %s", muxer_name);
         goto error;
     }
-    av_strlcpy(m->oc->filename, job->file, sizeof(m->oc->filename));
+    m->oc->url = strdup(job->file);
     ret = avio_open2(&m->oc->pb, job->file, AVIO_FLAG_WRITE,
                      &m->oc->interrupt_callback, NULL);
     if( ret < 0 )