]> git.sesse.net Git - nageru/blobdiff - futatabi/video_stream.cpp
Fix a leak in test code.
[nageru] / futatabi / video_stream.cpp
index 8593936800a81307dc79e482b657a91cead7421b..e41304bac948f9180b2f6f108cc121e26e950829 100644 (file)
@@ -208,10 +208,8 @@ VideoStream::VideoStream(AVFormatContext *file_avctx)
        check_error();
 
        OperatingPoint op;
-       if (global_flags.interpolation_quality == 0) {
-               // Allocate something just for simplicity; we won't be using it.
-               op = operating_point1;
-       } else if (global_flags.interpolation_quality == 1) {
+       if (global_flags.interpolation_quality == 0 ||
+           global_flags.interpolation_quality == 1) {
                op = operating_point1;
        } else if (global_flags.interpolation_quality == 2) {
                op = operating_point2;
@@ -220,6 +218,7 @@ VideoStream::VideoStream(AVFormatContext *file_avctx)
        } else if (global_flags.interpolation_quality == 4) {
                op = operating_point4;
        } else {
+               // Quality 0 will be changed to 1 in flags.cpp.
                assert(false);
        }