History

lavf, lavfi: Remove uses of sizeof(char).

The C standard requires sizeof(char) == 1.

Carl Eugen Hoyos committed 6 years ago

Commit 61dcaf51 parent e61767c3 files · +4 −4Browse files

Showing the changes to libavfilter (2 of 3 files). Show all

Unified · Split

2 files
  1. libavfilter/dnn/dnn_backend_tf.c +1 −1
  2. libavfilter/vf_deshake.c +2 −2
libavfilter/dnn/dnn_backend_tf.c+1−1
@@ -95,7 +95,7 @@ static TF_Tensor *allocate_input_tensor(const DNNData *input) · 94 unmodified lines
9595 break;
9696 case DNN_UINT8:
9797 dt = TF_UINT8;
98− size = sizeof(char);
98+ size = 1;
9999 break;
100100 default:
101101 av_assert0(!"should not reach here");
libavfilter/vf_deshake.c+2−2
@@ -354,7 +354,7 @@ static av_cold int init(AVFilterContext *ctx) · 353 unmodified lines
354354 if (deshake->filename)
355355 deshake->fp = fopen(deshake->filename, "w");
356356 if (deshake->fp)
357− fwrite("Ori x, Avg x, Fin x, Ori y, Avg y, Fin y, Ori angle, Avg angle, Fin angle, Ori zoom, Avg zoom, Fin zoom\n", sizeof(char), 104, deshake->fp);
357+ fwrite("Ori x, Avg x, Fin x, Ori y, Avg y, Fin y, Ori angle, Avg angle, Fin angle, Ori zoom, Avg zoom, Fin zoom\n", 1, 104, deshake->fp);
358358
359359 // Quadword align left edge of box for MMX code, adjust width if necessary
360360 // to keep right margin
@@ -485,7 +485,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) · 124 unmodified lines
485485 // Write statistics to file
486486 if (deshake->fp) {
487487 snprintf(tmp, 256, "%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f\n", orig.vec.x, deshake->avg.vec.x, t.vec.x, orig.vec.y, deshake->avg.vec.y, t.vec.y, orig.angle, deshake->avg.angle, t.angle, orig.zoom, deshake->avg.zoom, t.zoom);
488− fwrite(tmp, sizeof(char), strlen(tmp), deshake->fp);
488+ fwrite(tmp, 1, strlen(tmp), deshake->fp);
489489 }
490490
491491 // Turn relative current frame motion into absolute by adding it to the

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t