Skip to content

Instantly share code, notes, and snippets.

Luca Barbato lu-zero

Block or report user

Report or block lu-zero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:1074275
- pb = avio_alloc_context(framebuf, 1000*1000, URL_RDONLY, opaque, read_packet_from_queue, NULL, NULL);
- pb->is_streamed = 1;
+ pb = avio_alloc_context(framebuf, 1000*1000, 0, opaque, read_packet_from_queue, NULL, NULL);
+ pb->seekable = 0;
+ avfc->pb = pb;
View Diego's reply
On Sun, Nov 27, 2011 at 10:07:55PM +0200, Asen Lekov wrote:
> --- a/libavcodec/snow.c
> +++ b/libavcodec/snow.c
> @@ -35,46 +35,51 @@
>
> s->b_width = w;
> - s->b_height= h;
> + s->b_height = h;
Here (and in similar places) the '=' should end up vertically aligned,
i.e.:
@lu-zero
lu-zero / yuv4mpeg-review.diff
Created Nov 30, 2011
Some corrections for you
View yuv4mpeg-review.diff
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index e1db1a3..f80d2bc 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -42,7 +42,8 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf)
width = st->codec->width;
height = st->codec->height;
- av_reduce(&raten, &rated, st->codec->time_base.den, st->codec->time_base.num, (1UL<<31)-1);
+ av_reduce(&raten, &rated, st->codec->time_base.den,
View gist:2702182
diff --git a/avprobe.c b/avprobe.c
index 8d2ec24..848d278 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -63,6 +63,207 @@ void exit_program(int ret)
exit(ret);
}
+static int print_section_separator;
+static int print_chapter_separator;
@lu-zero
lu-zero / libmpv.h
Created Jun 26, 2013
High level api, missing player reconfiguration on the fly. It is _really_ simple and easy to use, Ideally you create a playlist or load a playlist, with the default playlist being NULL. The items abstraction let you put in the playlist items and possibly add offsets within the file (later) the player abstraction let you seek and play within the …
View libmpv.h
typedef struct MPVPlayer;
MPVPlayer *mpv_alloc();
int mpv_parse(MPVPlayer *m, int argc, char *argv, char *envp);
int mpv_play(MPVPlayer *m);
int mpv_pause(MPVPlayer *m);
@lu-zero
lu-zero / amf_dump.c
Last active Dec 23, 2015
In case you need it to debug flvdec.c
View amf_dump.c
static void amf_dump(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
int v;
char buf[1024];
if (pb->eof_reached)
return;
switch ((v = avio_r8(pb))) {
@lu-zero
lu-zero / gist:9400fc7b2fba1f35d118
Created Aug 20, 2014
Building libav for ios/arm64
View gist:9400fc7b2fba1f35d118
../configure \
--cc=`xcrun -f --sdk iphoneos7.1 clang` \
--arch=aarch64 \
--cpu=generic \
--sysroot=`xcrun --sdk iphoneos7.1 --show-sdk-path` \
--target-os=darwin \
--extra-cflags='-arch arm64' \
--extra-ldflags='-arch arm64 -miphoneos-version-min=7.0' \
--enable-cross-compile
View keybase.md

Keybase proof

I hereby claim:

  • I am lu-zero on github.
  • I am lu_zero (https://keybase.io/lu_zero) on keybase.
  • I have a public key whose fingerprint is 1965 8F02 6BD4 3483 3265 5B05 6DEF F12B 9916 8B55

To claim this, I am signing this object:

@lu-zero
lu-zero / gist:75a260874bb9931c6304
Created Jan 9, 2015
gnutls build system is horrid...
View gist:75a260874bb9931c6304
SRC_nettle="http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz"
SRC_libtasn1="http://distfiles.gentoo.org/distfiles/libtasn1-4.2.tar.gz"
SRC_gmp="http://distfiles.gentoo.org/distfiles/gmp-6.0.0a.tar.xz"
SRC_gnutls="http://distfiles.gentoo.org/distfiles/gnutls-3.3.11.tar.xz"
#AUTOTOOL_SRC="gmp nettle libtasn1 gnutls"
AUTOTOOL_SRC="gmp nettle libtasn1 gnutls"
ROOTDIR="$PWD";
@lu-zero
lu-zero / mms_open.c
Created Jan 21, 2015
How to open mms:// url in Libav
View mms_open.c
/*
* How to open mms:// url in Libav
*
* Libav 12 will sport a chained protocol that aliases to the following
*
*/
int example_open(AVFormatContext **ic, const char *url)
{
You can’t perform that action at this time.