]> git.sesse.net Git - nageru/blobdiff - nageru/quicksync_encoder.cpp
Update the textual list of dependencies in the README.
[nageru] / nageru / quicksync_encoder.cpp
index 9723118a7c3efaeab12ffdb5af3c1e9e84265093..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);
@@ -1939,8 +1938,6 @@ void QuickSyncEncoderImpl::add_packet_for_uncompressed_frame(int64_t pts, int64_
        stream_mux->add_packet(pkt, pts, pts);
 }
 
-namespace {
-
 void memcpy_with_pitch(uint8_t *dst, const uint8_t *src, size_t src_width, size_t dst_pitch, size_t height)
 {
        if (src_width == dst_pitch) {
@@ -1954,8 +1951,6 @@ void memcpy_with_pitch(uint8_t *dst, const uint8_t *src, size_t src_width, size_
        }
 }
 
-}  // namespace
-
 void QuickSyncEncoderImpl::pass_frame(QuickSyncEncoderImpl::PendingFrame frame, int display_frame_num, int64_t pts, int64_t duration)
 {
        // Wait for the GPU to be done with the frame.