Skip to content

Instantly share code, notes, and snippets.

@rdp
rdp / gist:8847062
Last active August 29, 2015 13:56
wurking
02/06/2014 08:58 AM 5,964 image001.jpg
02/06/2014 08:58 AM 5,964 image002.jpg
02/06/2014 08:58 AM 5,964 image003.jpg
02/06/2014 08:58 AM 5,964 image004.jpg
02/06/2014 08:58 AM 5,964 image005.jpg
02/06/2014 08:58 AM 5,964 image006.jpg
02/06/2014 08:58 AM 8,700 image007.jpg
02/06/2014 08:58 AM 29,094 image008.jpg
02/06/2014 08:58 AM 19,426 image009.jpg
02/06/2014 08:58 AM 43,872 image010.jpg
diff --git a/libavformat/udp.c b/libavformat/udp.c
index a61ac33..c982245 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -784,10 +784,11 @@ static int udp_read(URLContext *h, uint8_t *buf, int size)
av_fifo_generic_read(s->fifo, tmp, 4, NULL);
avail= AV_RL32(tmp);
if(avail > size){
- av_log(h, AV_LOG_WARNING, "Part of datagram lost due to insufficient buffer size\n");
- avail= size;
@rdp
rdp / mplayer_udp_debug.diff
Created February 18, 2014 17:31
some pasted notes (too big) to not lose them...don't use this though...
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 3c0d6bf..ee758cc 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -40,6 +40,8 @@
#include "os_support.h"
#include "url.h"
+#undef HAVE_PTHREAD_CANCEL // rdp mine to disable if you have this line commented out, then you have the q
+
@rdp
rdp / JavaBug.java
Created March 7, 2014 18:40
java doesn't render two combining diacriticals in thai right
import java.awt.*;
import java.awt.image.BufferedImage;
/**
*/
public class JavaBug {
public static void main(String[] args) {
BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics2D = image.createGraphics();
@rdp
rdp / gist:9547906
Created March 14, 2014 13:45
substruct 1.9'ish perhaps?
diff --git a/config/environment.rb b/config/environment.rb
index e08b1e4..7caf387 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -6,7 +6,7 @@
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
-
+$: << '.' if RUBY_VERSION >= '1.9.0'
require 'jruby'
require 'pp'
JFrame = javax.swing.JFrame
JCheckBox = javax.swing.JCheckBox
JOptionPane = javax.swing.JOptionPane
class JCheckBox
def on_clicked &block
@rdp
rdp / gist:11180399
Created April 22, 2014 14:01
ffmpeg batch compile
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
c:\dev>ECHO echo $HOME | .\cygwin\bin\bash--login
The system cannot find the path specified.
c:\dev>cd \downloads
c:\downloads>ECHO echo $HOME | .\cygwin\bin\bash--login
'.\cygwin\bin\bash--login' is not recognized as an internal or external command,
@rdp
rdp / test.go
Created April 23, 2014 16:51
demo of iterating over "just the keys" in a golang map
package main
import "fmt"
func main() {
m := map[string]string{ "key1":"val1", "key2":"val2" };
for k := range m {
fmt.Println("key is:" + k)
}
@rdp
rdp / gist:11271484
Created April 24, 2014 22:19
mplayer output
c:\dev>mplayer -autosync 30 -identify dvdnav://18
c:\dev>c:\installs\MPlayer-rtm-svn-34401\mplayer.exe -nocache -framedrop -vo direct3d -autosync 30 -identify dvdnav://18
MPlayer Sherpya-SVN-r34401-4.6.2 (C) 2000-2011 MPlayer Team
Playing dvdnav://18.
libdvdnav: Using dvdnav version MPlayer-custom
libdvdread: Using libdvdcss version 1.2.10 for DVD access
NAME OPEN FAILED
libdvdnav: Unable to find map file 'c:\installs\MPlayer-rtm-svn-34401\dvdnav\.map'
@rdp
rdp / gist:11272472
Created April 24, 2014 23:02
2.1.3 tools messages
main error: ES_OUT_RESET_PCR called
main error: ES_OUT_RESET_PCR called
direct3d warning: trying surface pixel format: YV12
main error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 300 ms)
main error: ES_OUT_RESET_PCR called
main warning: playback too late (65582): up-sampling
main warning: playback too late (60874): up-sampling
main warning: playback too late (60874): up-sampling
main error: ES_OUT_RESET_PCR called