Description: Autogenerated patch header for a single-debian-patch file.
 The delta against upstream is either kept as a single patch, or maintained
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
Forwarded: not-needed

---
--- /dev/null
+++ libmedia-convert-perl-1.5.2/.gitlab-ci.yml
@@ -0,0 +1,78 @@
+---
+variables:
+  SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
+  SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
+include:
+- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
+
+stages:
+- upstream
+- provisioning
+- build
+- publish
+- test
+
+.test: &test
+  stage: upstream
+  image: $CI_JOB_NAME
+  coverage: '/^Total.* (\d+.\d+)$/'
+  before_script:
+  - if [ ! -z "$NEEDS_ARCHIVE" ]; then sed -i -e 's/deb.debian.org/archive.debian.org/;/security.debian.org/d' /etc/apt/sources.list; fi
+  - cpanm --notest ExtUtils::Depends Devel::Cover TAP::Harness::JUnit Devel::Cover::Report::Cobertura
+  - apt-get update && apt-get -y --no-install-recommends install ffmpeg
+  - cpanm --notest --installdeps .
+  - perl Makefile.PL
+  script:
+  - cover -delete
+  - HARNESS_PERL_SWITCHES='-MDevel::Cover' prove -v -l -s --harness TAP::Harness::JUnit
+  - cover
+  - cover -report cobertura
+  artifacts:
+    paths:
+    - cover_db
+    reports:
+      junit: junit_output.xml
+      coverage_report:
+        path: cover_db/cobertura.xml
+        coverage_format: cobertura
+
+perl:latest:
+  <<: *test
+
+perl:5.28:
+  variables:
+    NEEDS_ARCHIVE: 1
+  <<: *test
+
+test:committed:
+  stage: upstream
+  image: perl:latest
+  before_script:
+  - apt-get update && apt-get -y --no-install-recommends install git ffmpeg
+  - cpanm --notest ExtUtils::Depends
+  - cpanm --notest --installdeps .
+  - perl Makefile.PL
+  script:
+  - make manifest
+  - git diff --exit-code
+
+test:critic:
+  stage: upstream
+  image: perl:latest
+  before_script:
+  - cpanm --notest Perl::Critic
+  script:
+  - perlcritic .
+
+dput:
+  stage: publish
+  image: debian:stable
+  dependencies:
+  - build
+  allow_failure: true
+  before_script:
+  - apt-get update
+  - apt-get -y install dput-ng curl
+  - echo -e "[gitlab]\nmethod=https\nfqdn=https://gitlab-runner:$CI_JOB_TOKEN@$CI_SERVER_HOST\nincoming=/api/v4/projects/$CI_PROJECT_ID/packages/debian\n" > dput.cf
+  script:
+  - dput --config=dput.cf --unchecked --no-upload-log gitlab debian/output/*.changes
--- libmedia-convert-perl-1.5.2.orig/MANIFEST
+++ libmedia-convert-perl-1.5.2/MANIFEST
@@ -42,5 +42,3 @@ t/script.t
 t/testvids/bbb.mp4
 t/testvids/m-c.png
 t/testvids/m-c.svg
-META.yml                                 Module YAML meta-data (added by MakeMaker)
-META.json                                Module JSON meta-data (added by MakeMaker)
--- /dev/null
+++ libmedia-convert-perl-1.5.2/t/start_time_correct.t
@@ -0,0 +1,66 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use feature "say";
+use JSON::MaybeXS;
+
+use Test::More;
+
+sub get_start_times {
+        my $values = shift;
+        my %rv;
+        foreach my $stream(@{$values->{streams}}) {
+                next unless defined($stream->{codec_type});
+                next unless defined($stream->{start_time});
+                $rv{$stream->{codec_type}} = 0 + $stream->{start_time};
+        }
+        return \%rv;
+}
+
+sub get_values {
+        my $fn = shift;
+        my @cmd = ("ffprobe", "-loglevel", "quiet", "-show_entries", "stream=codec_type,start_time", "-print_format", "json", $fn);
+        say "'" . join("' '", @cmd) . "'";
+        open my $jsonpipe, "-|:encoding(UTF-8)", @cmd;
+        my $json = "";
+        while(my $line = <$jsonpipe>) {
+                $json .= $line;
+        }
+        $json = decode_json($json);
+        close $jsonpipe;
+        return $json;
+}
+
+sub debug_values {
+        my $values = shift;
+        foreach my $stream(@{$values->{streams}}) {
+                say "codec with type " . $stream->{codec_type} . " and start time " . $stream->{start_time};
+        }
+}
+
+use_ok("Media::Convert::Asset");
+use_ok("Media::Convert::AccurateCut");
+
+my $asset = Media::Convert::Asset->new(url => "t/testvids/bbb.mp4");
+isa_ok($asset, "Media::Convert::Asset");
+
+my $values = get_values($asset->url);
+
+debug_values($values);
+
+my $output = Media::Convert::Asset->new(url => "./bbb.mkv");
+my $cut = Media::Convert::AccurateCut->new(input => $asset, output => $output, start => 0.1);
+$cut->run;
+
+$values = get_values($output->url);
+
+debug_values($values);
+
+my $starts = get_start_times($values);
+ok(exists($starts->{audio}), 'output has audio stream');
+ok(exists($starts->{video}), 'output has video stream');
+my $delta = abs($starts->{audio} - $starts->{video});
+cmp_ok($delta, '<=', 0.03, 'audio/video start times are close enough');
+
+done_testing()
