summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-12-12 15:40:59 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-12-12 15:40:59 +0000
commitc1486cd0a71644878abf77039f8450450a4cdb7c (patch)
tree79e64897f8002f3aa486f8d2b13db3275bc76002
parente8affca9f7a6d52546aed4a0849af48339f851c0 (diff)
downloadgst-libav-c1486cd0a71644878abf77039f8450450a4cdb7c.tar.gz
Re-enable SVQ3, and also add a workaround for the fact that it writes to (read-only) buffers. This effectively makes ...
Original commit message from CVS: Re-enable SVQ3, and also add a workaround for the fact that it writes to (read-only) buffers. This effectively makes svq3 work
-rw-r--r--ext/ffmpeg/gstffmpegdec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 0c4cd07..41c0bf6 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -344,9 +344,11 @@ gst_ffmpegdec_chain (GstPad *pad,
switch (oclass->in_plugin->type) {
case CODEC_TYPE_VIDEO:
- /* workaround:
- libavcodec/svq1.c:svq1_decode_frame writes to the given buffer */
- if (oclass->in_plugin->id == CODEC_ID_SVQ1) {
+ /* workarounds, functions write to buffers:
+ libavcodec/svq1.c:svq1_decode_frame writes to the given buffer.
+ libavcodec/svq3.c:svq3_decode_slice_header too */
+ if (oclass->in_plugin->id == CODEC_ID_SVQ1 ||
+ oclass->in_plugin->id == CODEC_ID_SVQ3) {
inbuf = gst_buffer_copy_on_write(inbuf);
data = GST_BUFFER_DATA (inbuf);
size = GST_BUFFER_SIZE (inbuf);
@@ -480,7 +482,6 @@ gst_ffmpegdec_register (GstPlugin *plugin)
/* no quasi-codecs, please */
if (in_plugin->id == CODEC_ID_RAWVIDEO ||
- in_plugin->id == CODEC_ID_SVQ3 || /* segfaults */
(in_plugin->id >= CODEC_ID_PCM_S16LE &&
in_plugin->id <= CODEC_ID_PCM_ALAW)) {
goto next;