annotate src/of-video-1-fixes.patch @ 4076:7c123db86666

of-video: fix crash in of-video * src/of-video-1-fixes.patch: update patch for using av_malloc
author John Donoghue
date Fri, 08 Jan 2016 13:54:13 -0500
parents 03ed5810b068
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4076
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
1 diff -ur video-1.2.1.orig/src/AVHandler.cc video-1.2.1/src/AVHandler.cc
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
2 --- video-1.2.1.orig/src/AVHandler.cc 2016-01-06 12:44:20.588188244 -0500
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
3 +++ video-1.2.1/src/AVHandler.cc 2016-01-08 08:40:05.511829573 -0500
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
4 @@ -560,7 +560,7 @@
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
5 }
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
6
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
7 // XXX FIXME XXX What is the best size for video_outbuf?
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
8 - video_outbuf = (uint8_t *)malloc(VIDEO_OUTBUF_SIZE);
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
9 + video_outbuf = (uint8_t *)av_malloc(VIDEO_OUTBUF_SIZE);
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
10
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
11 return 0;
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
12 }
4073
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
13 diff -ur video-1.2.1.orig/src/oct-avifile.cc video-1.2.1/src/oct-avifile.cc
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
14 --- video-1.2.1.orig/src/oct-avifile.cc 2016-01-06 12:44:20.588188244 -0500
4076
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
15 +++ video-1.2.1/src/oct-avifile.cc 2016-01-08 08:38:22.357487990 -0500
4073
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
16 @@ -57,6 +57,14 @@
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
17 }
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
18
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
19 void
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
20 +Avifile::print(std::ostream& os, bool pr_as_read_syntax)
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
21 +{
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
22 + os << "AVI movie [" << filename << "][" << av->get_codec() << "]: "
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
23 + << frames << " frame" << (frames != 1 ? "s" : "") << ", "
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
24 + << frame_rows << "x" << frame_columns << "\n";
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
25 +}
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
26 +
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
27 +void
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
28 Avifile::addframe(const NDArray &f)
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
29 {
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
30 if (frames == 0)
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
31 diff -ur video-1.2.1.orig/src/oct-avifile.h video-1.2.1/src/oct-avifile.h
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
32 --- video-1.2.1.orig/src/oct-avifile.h 2016-01-06 12:44:20.588188244 -0500
4076
7c123db86666 of-video: fix crash in of-video
John Donoghue
parents: 4073
diff changeset
33 +++ video-1.2.1/src/oct-avifile.h 2016-01-08 08:39:19.029576872 -0500
4073
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
34 @@ -52,6 +52,7 @@
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
35 ~Avifile(void);
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
36
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
37 void print(std::ostream& os, bool pr_as_read_syntax) const;
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
38 + void print(std::ostream& os, bool pr_as_read_syntax=false);
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
39
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
40 void addframe(const NDArray &f);
03ed5810b068 of-video: add video package
John Donoghue
parents:
diff changeset
41