h264extractor icon indicating copy to clipboard operation
h264extractor copied to clipboard

Error Return for filter expressions

Open xarlord opened this issue 1 year ago • 1 comments

While working on a pcap file i had saw such error, which does not allow code to execute corrcetly, i can suggest a fix at given below, at least it worked for me.

image

    local function dump_filter(fd)
        local fh = "h264"
        if fd and fd ~= "" then
            return string.format("%s and (%s)", fh, fd)
        else
            return fh  -- Default to "h264" if no additional filter is provided
        end
    end
    
    local h264_tap = Listener.new("ip", dump_filter(get_filter()))

xarlord avatar Jan 07 '25 18:01 xarlord

Thanks for figure out. I'm not sure if it is a specific issue related to Wireshark for the code worked well before. Feel free to raise a PR to fix.

volvet avatar Jan 13 '25 07:01 volvet