Displaying 7 results from an estimated 7 matches for "av_free".
Did you mean:
pv_free
2007 Jun 26
0
2 commits - libswfdec/swfdec_codec_ffmpeg.c
...->height;
*rowstride = codec->ctx->width * 4;
@@ -238,6 +247,9 @@ swfdec_video_decoder_ffmpeg_free (Swfdec
{
SwfdecVideoDecoderFFMpeg *codec = (SwfdecVideoDecoderFFMpeg *) dec;
+ if (codec->sws) {
+ sws_freeContext (codec->sws);
+ };
avcodec_close (codec->ctx);
av_free (codec->ctx);
av_free (codec->frame);
2004 Nov 20
0
ffmpeg2theora start and end time support
...Frame.
*/
AVFrame *alloc_picture (int pix_fmt, int width, int height){
AVFrame *picture;
uint8_t *picture_buf;
int size;
picture = avcodec_alloc_frame ();
if (!picture)
return NULL;
size = avpicture_get_size (pix_fmt, width, height);
picture_buf = av_malloc (size);
if (!picture_buf){
av_free (picture);
return NULL;
}
avpicture_fill ((AVPicture *) picture, picture_buf,
pix_fmt, width, height);
return picture;
}
/**
* initialize ff2theora with default values
* @return ff2theora struct
*/
ff2theora ff2theora_init (){
ff2theora this = calloc (1, sizeof (*this));
if (this != N...
2003 May 04
0
VP3 In ffmpeg
...for the past few days
to finish up the new VP3 decoder and it is (almost) ready to go. Here are
some outstanding issues:
* I can not make it play nicely with ffmpeg (I do my development and
testing in xine). When I hook it up, ffmpeg always crashes after the first
frame decode. gdb points back to av_free() but I am willing to admit there
is probably something wrong with my decoder which causes it.
* If you do get it to run, you will immediately notice something missing,
like all of the motion-compensated macroblocks. There are 2 things at work
here: I can not even begin to understand how ffmpeg do...
2007 Apr 06
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_codec_video.c
...ret;
}
static void
-swfdec_codec_ffmpeg_video_finish (gpointer codec_data)
+swfdec_video_decoder_ffmpeg_free (SwfdecVideoDecoder *dec)
{
- SwfdecCodecFFMpegVideo *codec = codec_data;
+ SwfdecVideoDecoderFFMpeg *codec = (SwfdecVideoDecoderFFMpeg *) dec;
+
avcodec_close (codec->ctx);
av_free (codec->ctx);
av_free (codec->frame);
+ g_free (codec);
}
+SwfdecVideoDecoder *
+swfdec_video_decoder_ffmpeg_new (SwfdecVideoFormat type)
+{
+ SwfdecVideoDecoderFFMpeg *codec;
+ AVCodecContext *ctx;
+ enum CodecID id;
-const SwfdecVideoCodec swfdec_codec_ffmpeg_video = {
- swfdec...
2007 Apr 05
0
4 commits - libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_stream.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_mad.c
...se SWFDEC_VIDEO_FORMAT_SCREEN:
+ id = CODEC_ID_FLASHSV;
+ break;
+ default:
+ g_assert_not_reached ();
+ id = 0;
+ break;
+ }
+ ctx = swfdec_codec_ffmpeg_init (id);
if (ctx == NULL)
return NULL;
@@ -273,31 +282,9 @@ swfdec_codec_ffmpeg_video_finish (gpoint
av_free (codec->frame);
}
-static gpointer
-swfdec_codec_ffmpeg_screen_init (void)
-{
- SwfdecCodecFFMpegVideo *codec;
- AVCodecContext *ctx = swfdec_codec_ffmpeg_init (CODEC_ID_FLASHSV);
-
- if (ctx == NULL)
- return NULL;
- codec = g_new (SwfdecCodecFFMpegVideo, 1);
- codec->ctx = ctx;
-...
2007 Apr 08
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_buffer.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c
...g = (SwfdecAudioDecoderFFMpeg *) dec;
- return outbuf;
+ return swfdec_buffer_queue_pull_buffer (ffmpeg->queue);
}
-static SwfdecBuffer *
-swfdec_codec_ffmpeg_audio_finish (gpointer ctx)
+static void
+swfdec_audio_decoder_ffmpeg_free (SwfdecAudioDecoder *dec)
{
- avcodec_close (ctx);
- av_free (ctx);
+ SwfdecAudioDecoderFFMpeg *ffmpeg = (SwfdecAudioDecoderFFMpeg *) dec;
- return NULL;
+ avcodec_close (ffmpeg->ctx);
+ av_free (ffmpeg->ctx);
+ swfdec_buffer_queue_unref (ffmpeg->queue);
+
+ g_slice_free (SwfdecAudioDecoderFFMpeg, ffmpeg);
}
+SwfdecAudioDecoder *
+swfdec_...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...->height;
*rowstride = codec->ctx->width * 4;
@@ -238,6 +247,9 @@ swfdec_video_decoder_ffmpeg_free (Swfdec
{
SwfdecVideoDecoderFFMpeg *codec = (SwfdecVideoDecoderFFMpeg *) dec;
+ if (codec->sws) {
+ sws_freeContext (codec->sws);
+ };
avcodec_close (codec->ctx);
av_free (codec->ctx);
av_free (codec->frame);