瀏覽代碼

deps-libff: Send NULL frame to callback if EOF

A null frame send to the frame callback signals
the end of media being played.  Null frames are not
sent for looped media
kc5nra 10 年之前
父節點
當前提交
8effe2c635
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      deps/libff/libff/ff-decoder.c

+ 1 - 0
deps/libff/libff/ff-decoder.c

@@ -184,6 +184,7 @@ void ff_decoder_refresh(void *opaque)
 				// Schedule another call as soon as possible
 				ff_decoder_schedule_refresh(decoder, 1);
 			} else {
+				ff_callbacks_frame(decoder->callbacks, NULL);
 				decoder->refresh_timer.abort = true;
 				// no more refreshes, we are at the eof
 				av_log(NULL, AV_LOG_INFO,