summaryrefslogtreecommitdiffstats
path: root/contrib/patch-ffmpeg.patch
blob: c653641382784b381fc561389753a6457b81d8db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
diff -ru ffmpeg-20060326-bak/configure ffmpeg-20060326/configure
--- ffmpeg-20060326-bak/configure	2006-03-26 22:04:53.000000000 +0200
+++ ffmpeg-20060326/configure	2006-04-26 16:48:00.000000000 +0200
@@ -272,7 +272,7 @@
 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
 mmx="no"
 ;;
-*20010315*) echo "BeBits gcc"
+*20010315*|2.95.3*) echo "BeBits gcc"
 CFLAGS="$CFLAGS -fno-expensive-optimizations"
 ;;
 esac
diff -ru ffmpeg-20060326-bak/libavformat/movenc.c ffmpeg-20060326/libavformat/movenc.c
--- ffmpeg-20060326-bak/libavformat/movenc.c	2006-03-26 22:04:53.000000000 +0200
+++ ffmpeg-20060326/libavformat/movenc.c	2006-04-26 16:48:54.000000000 +0200
@@ -22,6 +22,10 @@
 #include "avio.h"
 #include "mov.h"
 
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
 #undef NDEBUG
 #include <assert.h>
 
@@ -435,11 +439,6 @@
             end = track->vosData + track->vosLen;
 
             put_byte(pb, 1); /* version */
-            put_byte(pb, 77); /* profile */
-            put_byte(pb, 64); /* profile compat */
-            put_byte(pb, 30); /* level */
-            put_byte(pb, 0xff); /* 6 bits reserved (111111) + 2 bits nal size length - 1 (11) */
-            put_byte(pb, 0xe1); /* 3 bits reserved (111) + 5 bits number of sps (00001) */
 
             /* look for sps and pps */
             while (buf < end) {
@@ -458,6 +457,12 @@
             }
             assert(sps);
             assert(pps);
+
+            put_byte(pb, sps[1]); /* profile */
+            put_byte(pb, sps[2]); /* profile compat */
+            put_byte(pb, sps[3]); /* level */
+            put_byte(pb, 0xff); /* 6 bits reserved (111111) + 2 bits nal size length - 1 (11) */
+            put_byte(pb, 0xe1); /* 3 bits reserved (111) + 5 bits number of sps (00001) */
             put_be16(pb, sps_size);
             put_buffer(pb, sps, sps_size);
             put_byte(pb, 1); /* number of pps */
@@ -621,6 +626,18 @@
     return tag;
 }
 
+static int mov_write_colr_tag(ByteIOContext *pb)
+{
+    put_be32( pb, 0x12 );
+    put_tag( pb, "colr" );
+    put_tag( pb, "nclc" );
+    put_be16( pb, 6 );
+    put_be16( pb, 1 );
+    put_be16( pb, 6 );
+    put_be32( pb, 0 );
+    return 0x12;
+}
+
 static int mov_write_video_tag(ByteIOContext *pb, MOVTrack* track)
 {
     offset_t pos = url_ftell(pb);
@@ -670,6 +687,8 @@
     else if(track->enc->codec_id == CODEC_ID_H264)
         mov_write_avcc_tag(pb, track);
 
+    mov_write_colr_tag(pb);
+
     return updateSize (pb, pos);
 }
 
diff -ru ffmpeg-20060326-bak/libavformat/tcp.c ffmpeg-20060326/libavformat/tcp.c
--- ffmpeg-20060326-bak/libavformat/tcp.c	2006-03-26 22:04:53.000000000 +0200
+++ ffmpeg-20060326/libavformat/tcp.c	2006-04-26 16:48:00.000000000 +0200
@@ -112,11 +112,13 @@
                 break;
         }
 
+#ifndef __BEOS__
         /* test error */
         optlen = sizeof(ret);
         getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen);
         if (ret != 0)
             goto fail;
+#endif
     }
     s->fd = fd;
     return 0;