Browse Source

xap/gpac: Updated.

slackware-14.2
Damien Goutte-Gattat 8 years ago
parent
commit
c09aefeef2
  1. 60
      xap/gpac/gpac-0.5.0-ffmpeg2.diff
  2. 1
      xap/gpac/gpac.SlackBuild

60
xap/gpac/gpac-0.5.0-ffmpeg2.diff

@ -0,0 +1,60 @@
diff -Naur gpac.orig/modules/ffmpeg_in/ffmpeg_decode.c gpac/modules/ffmpeg_in/ffmpeg_decode.c
--- gpac.orig/modules/ffmpeg_in/ffmpeg_decode.c 2012-02-29 17:24:24.000000000 +0100
+++ gpac/modules/ffmpeg_in/ffmpeg_decode.c 2013-12-25 20:21:43.341273936 +0100
@@ -169,7 +169,7 @@
frame = &ffd->base_frame;
}
if (!(*ctx)){
- *ctx = avcodec_alloc_context();
+ *ctx = avcodec_alloc_context3(*codec);
}
/*private FFMPEG DSI*/
@@ -317,7 +317,7 @@
(*ctx)->pix_fmt = ffd->raw_pix_fmt;
if ((*ctx)->extradata && strstr((*ctx)->extradata, "BottomUp")) ffd->flipped = 1;
} else {
- if (avcodec_open((*ctx), (*codec) )<0) return GF_NON_COMPLIANT_BITSTREAM;
+ if (avcodec_open2((*ctx), (*codec), NULL )<0) return GF_NON_COMPLIANT_BITSTREAM;
}
/*setup audio streams*/
@@ -611,7 +611,7 @@
if (ffd->frame_start>inBufferLength) ffd->frame_start = 0;
redecode:
- gotpic = AVCODEC_MAX_AUDIO_FRAME_SIZE;
+ gotpic = 192000;
#ifdef USE_AVCODEC2
len = avcodec_decode_audio3(ctx, (short *)ffd->audio_buf, &gotpic, &pkt);
#else
@@ -749,7 +749,7 @@
here this means the DSI was broken, so no big deal*/
avcodec_close(ctx);
*codec = avcodec_find_decoder(CODEC_ID_H263);
- if (! (*codec) || (avcodec_open(ctx, *codec)<0)) return GF_NON_COMPLIANT_BITSTREAM;
+ if (! (*codec) || (avcodec_open2(ctx, *codec, NULL)<0)) return GF_NON_COMPLIANT_BITSTREAM;
#if USE_AVCODEC2
if (avcodec_decode_video2(ctx, frame, &gotpic, &pkt) < 0) {
#else
@@ -759,7 +759,7 @@
avcodec_close(ctx);
*codec = avcodec_find_decoder(old_codec);
assert(*codec);
- avcodec_open(ctx, *codec);
+ avcodec_open2(ctx, *codec, NULL);
return GF_NON_COMPLIANT_BITSTREAM;
}
}
diff -Naur gpac.orig/modules/ffmpeg_in/ffmpeg_in.h gpac/modules/ffmpeg_in/ffmpeg_in.h
--- gpac.orig/modules/ffmpeg_in/ffmpeg_in.h 2012-05-24 14:45:43.000000000 +0200
+++ gpac/modules/ffmpeg_in/ffmpeg_in.h 2013-12-25 20:20:42.399950827 +0100
@@ -117,7 +117,7 @@
/*for audio packed frames*/
u32 frame_start;
- char audio_buf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
+ char audio_buf[192000];
Bool check_h264_isma;
u32 base_ES_ID;

1
xap/gpac/gpac.SlackBuild

@ -85,6 +85,7 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
patch -p 1 < $CWD/gpac-0.5.0-ffmpeg2.diff
CFLAGS="$CPUOPT" \
CXXFLAGS="$CPUOPT" \
./configure \

Loading…
Cancel
Save