search for: sample_bytes

Displaying 7 results from an estimated 7 matches for "sample_bytes".

2008 Jan 09
0
libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c libswfdec/swfdec_swf_decoder.c
...data", n_samples, skip, chunk->length); /* use this to write out the stream data to stdout - nice way to get an mp3 file :) */ //write (1, (void *) chunk->data, chunk->length); @@ -208,7 +208,7 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format) sample_bytes = swfdec_audio_format_get_bytes_per_sample (sound->decoded_format); n_samples = sound->n_samples / swfdec_audio_format_get_granularity (sound->decoded_format); - SWFDEC_LOG ("after decoding, got %u samples, should get %u and skip %u", + SWFDEC_LOG ("after decoding, g...
2007 Jan 16
0
9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_cache.c libswfdec/swfdec_cached.c libswfdec/swfdec_cached.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_image.c
...libswfdec/swfdec_sound.c +++ b/libswfdec/swfdec_sound.c @@ -179,6 +179,7 @@ tag_func_define_sound (SwfdecSwfDecoder SwfdecBuffer * swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioOut *format) { + const SwfdecAudioCodec *codec; gpointer decoder; SwfdecBuffer *tmp, *tmp2; guint sample_bytes; @@ -193,19 +194,19 @@ swfdec_sound_get_decoded (SwfdecSound *s } if (sound->encoded == NULL) return NULL; - sound->codec = swfdec_codec_get_audio (sound->format); - if (sound->codec == NULL) + codec = swfdec_codec_get_audio (sound->format); + if (codec == NULL) r...
2007 Oct 28
0
9 commits - configure.ac libswfdec/swfdec_as_context.c libswfdec/swfdec_audio_internal.h libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_sound.c
..._get_depth (queue); if (depth == 0) { @@ -204,7 +205,6 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format) tmp = swfdec_buffer_queue_pull (queue, depth); swfdec_buffer_queue_unref (queue); - sound->decoded_format = swfdec_audio_decoder_get_format (decoder); sample_bytes = swfdec_audio_format_get_bytes_per_sample (sound->decoded_format); n_samples = sound->n_samples / swfdec_audio_format_get_granularity (sound->decoded_format); commit 43c2c77acd07323c9fe8d395ec58b782222f2a70 Author: Benjamin Otte <otte at gnome.org> Date: Sun Oct 28 21:58:33 2...
2007 Oct 13
2
[Bug 12793] New: Crash playing a swf file (because of missing NULL ptr check)
..., format=0x8203d80) at swfdec_sound.c:205 205 SWFDEC_LOG ("after decoding, got %u samples, should get %u and skip %u", (gdb) p tmp $1 = (SwfdecBuffer *) 0x0 The code does : SWFDEC_LOG ("after decoding, got %u samples, should get %u and skip %u", tmp->length / sample_bytes, n_samples, sound->skip); tmp->length is the culprit. but tmp is used more and more after that so perhaps a small if (!tmp) is not enough. Attaching a link to the file once it has been uploaded -- Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are rece...
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
...nd.c @@ -179,9 +179,9 @@ tag_func_define_sound (SwfdecSwfDecoder SwfdecBuffer * swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioOut *format) { - const SwfdecAudioCodec *codec; gpointer decoder; - SwfdecBuffer *tmp, *tmp2; + SwfdecBuffer *tmp; + SwfdecBufferQueue *queue; guint sample_bytes; g_return_val_if_fail (SWFDEC_IS_SOUND (sound), NULL); @@ -194,38 +194,24 @@ swfdec_sound_get_decoded (SwfdecSound *s } if (sound->encoded == NULL) return NULL; - codec = swfdec_codec_get_audio (sound->format); - if (codec == NULL) - return NULL; - decoder = swfdec_aud...
2007 Oct 14
0
4 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_sound.c test/trace
...es #12793) diff --git a/libswfdec/swfdec_sound.c b/libswfdec/swfdec_sound.c index 7ee1660..e4e9086 100644 --- a/libswfdec/swfdec_sound.c +++ b/libswfdec/swfdec_sound.c @@ -171,6 +171,7 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format) SwfdecBufferQueue *queue; guint sample_bytes; guint n_samples; + guint depth; g_return_val_if_fail (SWFDEC_IS_SOUND (sound), NULL); g_return_val_if_fail (format != NULL, NULL); @@ -199,7 +200,12 @@ swfdec_sound_get_decoded (SwfdecSound *sound, SwfdecAudioFormat *format) swfdec_buffer_queue_push (queue, tmp); } swfdec_au...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...dex 1620f5d..7f302c1 100644 --- a/libswfdec/swfdec_sound.c +++ b/libswfdec/swfdec_sound.c @@ -235,17 +235,22 @@ swfdec_sound_get_decoded (SwfdecSound *s tmp = tmp2; } /* sound buffer may be bigger due to mp3 not having sample boundaries */ - if (tmp->length > sound->n_samples * sample_bytes) { - SwfdecBuffer *tmp2 = swfdec_buffer_new_subbuffer (tmp, 0, sound->n_samples * sample_bytes); + if (tmp->length * SWFDEC_AUDIO_OUT_GRANULARITY (sound->decoded_format) + > sound->n_samples * sample_bytes) { + SwfdecBuffer *tmp2 = swfdec_buffer_new_subbuffer (tmp, 0, +...