diff --git a/tests/test_codec_context.py b/tests/test_codec_context.py index ee9193c81..c9938d8ee 100644 --- a/tests/test_codec_context.py +++ b/tests/test_codec_context.py @@ -217,7 +217,7 @@ def image_sequence_encode(self, codec_name): self.assertEqual(frame.format.name, pix_fmt) def test_encoding_h264(self): - self.video_encoding("libx264", {"crf": "19"}) + self.video_encoding("h264", {"crf": "19"}) def test_encoding_mpeg4(self): self.video_encoding("mpeg4") @@ -292,11 +292,7 @@ def video_encoding(self, codec_name, options={}, codec_tag=None): packet_sizes.append(packet.size) f.write(packet) - dec_codec_name = codec_name - if codec_name == "libx264": - dec_codec_name = "h264" - - ctx = av.Codec(dec_codec_name, "r").create() + ctx = av.Codec(codec_name, "r").create() ctx.open() decoded_frame_count = 0 diff --git a/tests/test_encode.py b/tests/test_encode.py index a293cbf83..ca950e686 100644 --- a/tests/test_encode.py +++ b/tests/test_encode.py @@ -149,7 +149,7 @@ def test_encoding_with_pts(self): path = self.sandboxed("video_with_pts.mov") with av.open(path, "w") as output: - stream = output.add_stream("libx264", 24) + stream = output.add_stream("h264", 24) self.assertIn(stream, output.streams.video) stream.width = WIDTH stream.height = HEIGHT