]> git.sesse.net Git - nageru/blobdiff - nageru/quicksync_encoder.cpp
Move to FFmpeg 4.0 APIs, fixing the deprecation warnings.
[nageru] / nageru / quicksync_encoder.cpp
index b5d7c2d9dccf428665c954b161a57e6f76c3570c..3b8886ffc815da55715a51f663e501e2b23a6490 100644 (file)
@@ -1792,8 +1792,7 @@ void QuickSyncEncoderImpl::open_output_file(const std::string &filename)
 {
        AVFormatContext *avctx = avformat_alloc_context();
        avctx->oformat = av_guess_format(NULL, filename.c_str(), NULL);
-       assert(filename.size() < sizeof(avctx->filename) - 1);
-       strcpy(avctx->filename, filename.c_str());
+       avctx->url = strdup(filename.c_str());
 
        string url = "file:" + filename;
        int ret = avio_open2(&avctx->pb, url.c_str(), AVIO_FLAG_WRITE, &avctx->interrupt_callback, NULL);