]> git.sesse.net Git - nageru/blobdiff - nageru/quicksync_encoder.cpp
Add some asserts to track down pts/dts problems before we get crashes back from FFmpe...
[nageru] / nageru / quicksync_encoder.cpp
index 9a6bd6d9bf2095f02fd79934590624b77875058e..75b13b899a0cee05e109ef5b53764f82ebeb767b 100644 (file)
@@ -714,13 +714,10 @@ void QuickSyncEncoderImpl::enable_zerocopy_if_possible()
                // Quick Sync is entirely disabled.
                use_zerocopy = false;
        } else if (global_flags.x264_video_to_http) {
-               fprintf(stderr, "Disabling zerocopy H.264 encoding due to --http-x264-video.\n");
                use_zerocopy = false;
        } else if (global_flags.av1_video_to_http) {
-               fprintf(stderr, "Disabling zerocopy H.264 encoding due to --http-av1-video.\n");
                use_zerocopy = false;
        } else if (!global_flags.v4l_output_device.empty()) {
-               fprintf(stderr, "Disabling zerocopy H.264 encoding due to --v4l-output.\n");
                use_zerocopy = false;
        } else {
                use_zerocopy = true;
@@ -1352,6 +1349,7 @@ void QuickSyncEncoderImpl::save_codeddata(GLSurface *surf, storage_task task)
 // this is weird. but it seems to put a new frame onto the queue
 void QuickSyncEncoderImpl::storage_task_enqueue(storage_task task)
 {
+       assert(task.pts >= task.dts);
        lock_guard<mutex> lock(storage_task_queue_mutex);
        storage_task_queue.push(move(task));
        storage_task_queue_changed.notify_all();