Skip to content

Commit

Permalink
fix bug in nul_sink.py
Browse files Browse the repository at this point in the history
Reported-by: lxllsl
  • Loading branch information
JackLau1222 authored and sfeiwong committed Nov 18, 2024
1 parent 836c0bc commit d1b618e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bmf/modules/null_sink.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from bmf import Module, Log, LogLevel, InputType, ProcessResult, Packet, Timestamp, scale_av_pts, av_time_base, \
BmfCallBackType
BmfCallBackType, VideoFrame


class null_sink(Module):
Expand All @@ -14,12 +14,12 @@ def process(self, task):
for (input_id, input_packets) in task.get_inputs().items():
while not input_packets.empty():
pkt = input_packets.get()
if pkt.get_timestamp() == Timestamp.EOF:
if pkt.timestamp == Timestamp.EOF:
Log.log_node(LogLevel.DEBUG, task.get_node(),
"Receive EOF")
task.set_timestamp(Timestamp.DONE)
elif pkt.get_timestamp() != Timestamp.UNSET:
elif pkt.timestamp != Timestamp.UNSET:
Log.log_node(LogLevel.DEBUG, task.get_node(),
"process data", pkt.get_data(), 'time',
pkt.get_timestamp())
"process data", pkt.get(VideoFrame), 'time',
pkt.timestamp)
return ProcessResult.OK

0 comments on commit d1b618e

Please sign in to comment.