mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
1fe893777b
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
57 lines
1.6 KiB
Diff
57 lines
1.6 KiB
Diff
diff -Naur miro-4.0.4.orig/linux/miro-segmenter.c miro-4.0.4/linux/miro-segmenter.c
|
|
--- miro-4.0.4.orig/linux/miro-segmenter.c 2011-12-22 14:45:47.000000000 +0000
|
|
+++ miro-4.0.4/linux/miro-segmenter.c 2011-12-28 22:22:48.550499302 +0000
|
|
@@ -220,7 +220,11 @@
|
|
exit(1);
|
|
}
|
|
|
|
+#if LIBAVFORMAT_VERSION_MAJOR > 52
|
|
+ av_dump_format(oc, 0, input, 1);
|
|
+#else
|
|
dump_format(oc, 0, input, 1);
|
|
+#endif
|
|
|
|
if (video_st) {
|
|
codec = avcodec_find_decoder(video_st->codec->codec_id);
|
|
@@ -233,7 +237,11 @@
|
|
}
|
|
}
|
|
|
|
+#if LIBAVFORMAT_VERSION_MAJOR > 52
|
|
+ if (avio_open(&oc->pb, output_filename, URL_WRONLY) < 0) {
|
|
+#else
|
|
if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
|
|
+#endif
|
|
fprintf(stderr, "Could not open '%s'\n", output_filename);
|
|
exit(1);
|
|
}
|
|
@@ -274,10 +282,17 @@
|
|
}
|
|
|
|
if (segment_time - prev_segment_time >= segment_duration) {
|
|
+#if LIBAVFORMAT_VERSION_MAJOR > 52
|
|
+ avio_flush(oc->pb);
|
|
+ avio_close(oc->pb);
|
|
+
|
|
+ if (avio_open(&oc->pb, output_filename, URL_WRONLY) < 0) {
|
|
+#else
|
|
put_flush_packet(oc->pb);
|
|
url_fclose(oc->pb);
|
|
|
|
if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
|
|
+#endif
|
|
fprintf(stderr, "Could not open '%s'\n", output_filename);
|
|
break;
|
|
}
|
|
@@ -307,7 +322,11 @@
|
|
av_freep(&oc->streams[i]);
|
|
}
|
|
|
|
+#if LIBAVFORMAT_VERSION_MAJOR > 52
|
|
+ avio_close(oc->pb);
|
|
+#else
|
|
url_fclose(oc->pb);
|
|
+#endif
|
|
av_free(oc);
|
|
|
|
/* End-of-transcode marker. */
|