Hi, all,

As I try to use ffmpeg 2.1 with latest mpd 0.18.9, I found some issues below:


1.) seeking function doesn't work, I found that av_seek_frame function should 
be upgraded to avformat_seek_file, attached the patch.


--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx

-                       int64_t where =
-                               time_to_ffmpeg(decoder_seek_where(decoder),
-                                              av_stream->time_base) +
-                               av_stream->start_time;

-                       if (av_seek_frame(format_context, audio_stream, where,
-                                         AV_TIME_BASE) < 0)

+                       int64_t where = decoder_seek_where(decoder);


+                       //if (av_seek_frame(format_context, audio_stream, where,
+                       //                AV_TIME_BASE) < 0)

+                       int ret = avformat_seek_file(
+                               format_context, -1, //audio_stream, 
+                               INT64_MIN, (int64_t)(where * AV_TIME_BASE), 
INT64_MAX, 0);
+                       if (ret<0)



2.) after fixing seeking function, the status of .wav doesn't incorrect, it 
doesn't change. I don't have patch yet, but the problem is: 
   
    in multipleOutputs.cpp, the chunk->times always return zero, so the 
elapsed_time never update.


I hope somebody can fix issue 2 or any updates to work with ffmpeg 2.1.


Thanks!


Ricky Xian
_______________________________________________
mpd-devel mailing list
[email protected]
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to