# HG changeset patch # User nenolod # Date 1160669101 25200 # Node ID 6e1002ea4ded3a85577ff555ec5d644aa70bd5c8 # Parent 77e8e032601bad9618615d06798d634912a3ce39 [svn] - some seek code (can't be implemented right now though) - change `return 1' to `return NULL' in decode_thread(). diff -r 77e8e032601b -r 6e1002ea4ded ChangeLog --- a/ChangeLog Thu Oct 12 06:21:12 2006 -0700 +++ b/ChangeLog Thu Oct 12 09:05:01 2006 -0700 @@ -1,3 +1,11 @@ +2006-10-12 13:21:12 +0000 Yoshiki Yazawa + revision [180] + - fix for lock contention on saving m3u. locking playlist has been done in playlist_save(). + + trunk/src/m3u/m3u.c | 4 ---- + 1 file changed, 4 deletions(-) + + 2006-10-12 12:04:58 +0000 William Pitcock revision [178] - some fixes via alxorlov on the forums diff -r 77e8e032601b -r 6e1002ea4ded src/alac/plugin.c --- a/src/alac/plugin.c Thu Oct 12 06:21:12 2006 -0700 +++ b/src/alac/plugin.c Thu Oct 12 09:05:01 2006 -0700 @@ -49,6 +49,7 @@ gpointer decode_thread(void *args); static GThread *playback_thread; static int going = 0; +static int seek_to = -1; extern void set_endian(); @@ -189,7 +190,7 @@ static void seek(gint time) { - /* unimplemented */ + seek_to = time; } static gint get_time(void) @@ -277,6 +278,22 @@ int outputBytes; +#if 0 + /* XXX: Horribly inaccurate seek. -nenolod */ + if (seek_to != -1) + { + gulong duration = + (demux_res->num_sample_byte_sizes * (float)((1024 * demux_res->sample_size) - 1.0) / + (float)(demux_res->sample_rate / 251)); + + i = (duration - seek_to) / demux_res->num_sample_byte_sizes; + + g_print("seek to ALAC frame: %d\n", i); + + seek_to = -1; + } +#endif + /* just get one sample for now */ if (!get_sample_info(demux_res, i, &sample_duration, &sample_byte_size)) @@ -320,12 +337,12 @@ input_stream = stream_create_file(input_file, 1); if (!input_stream) - return 1; + return NULL; /* if qtmovie_read returns successfully, the stream is up to * the movie data, which can be used directly by the decoder */ if (!qtmovie_read(input_stream, &demux_res)) - return 1; + return NULL; demux_res.stream = input_stream;