}
if (o->format->event) {
o->format->event(o, SR_DF_END, &output_buf, &output_len);
- if (output_len) {
+ if (output_buf) {
if (outfile)
fwrite(output_buf, 1, output_len, outfile);
g_free(output_buf);
output_len = 0;
if (o->format->data && packet->type == o->format->df_type)
o->format->data(o, filter_out, filter_out_len, &output_buf, &output_len);
- if (output_len) {
+ if (output_buf) {
fwrite(output_buf, 1, output_len, outfile);
g_free(output_buf);
}