
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (43)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (7386)
-
Revision 1bd69ac57f : Fixing out of bounds access in frame_refs[] array. Change-Id : I08f45573e0b2195c
30 janvier 2014, par Dmitry KovalevChanged Paths :
Modify /vp9/encoder/vp9_onyx_int.h
Fixing out of bounds access in frame_refs[] array.Change-Id : I08f45573e0b2195c09fb6aecacb4c57431a711ea
-
libavfilter/scale2ref : Fix out-of-bounds array access
3 juin 2017, par Kevin Marklibavfilter/scale2ref : Fix out-of-bounds array access
ff_scale_eval_dimensions blindly assumes that two inputs are always
available as of 3385989b98be7940044e4f0a6b431a0a00abf2fa. This is
notably not the case when the function is called for the scale
filter. With the scale filter inputs[1] does not exist.ff_scale_eval_dimensions now has an updated scale2ref check that
makes certain two inputs are actually available before attempting to
access the second one.Thanks to James Almer for reporting this bug. This should fix the 820
Valgrind tests I single-handedly managed to break.Signed-off-by : Kevin Mark <kmark937@gmail.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
CGO : How to access a C pointer array from Golang
24 avril 2018, par nevernewI’m writing an app for the windows platform using FFmpeg and it’s golang wrapper goav, but I’m having trouble understanding how to use the C pointers to gain access to an array.
I’m trying to get the streams stored in the AVFormatContext class to use in go, and eventually add frames to a texture in OpenGl to make a video player with cool transitions.
I think understanding how to cast and access the C data will make coding this a lot easier.
I’ve stripped out all the relevant parts of the C code, the wrapper and my code, shown below :
C code - libavformat/avformat.h
typedef struct AVFormatContext {
unsigned int nb_streams;
AVStream **streams;
}Golang goav wrapper
package avutil
//#cgo pkg-config: libavformat
//#include <libavformat></libavformat>avformat.h>
import "C"
import (
"unsafe"
)
type Context C.struct_AVFormatContext;
func (ctxt *Context) StreamsGet(i uintptr) *Stream {
streams := (**Stream)(unsafe.Pointer(ctxt.streams));
// I think this is where it's going wrong, I'm brand new to this stuff
return (*Stream)(unsafe.Pointer(uintptr(unsafe.Pointer(streams)) + i*unsafe.Sizeof(*streams)));
}My Golang code
package main
import "github.com/giorgisio/goav/avformat"
func main() {
ctx := &avformat.Context{} // the actual function to initiate this does an mallocz for the streams
stream := ctx.StreamsGet(0)
//do stuff with stream...
}In C it looks like I just have to do just streams[i], but that wont work in go, so I added a function to the wrapper using the technique from my question here.
However I’m not getting the data ; It looks like I’m getting a pointer to somewhere random in memory. So, how can I access these elements form golang ? Any resources would be helpful too ; I’m going to be investing a fair bit of time into this.