tvheadend-4.2.8-gcc9.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. diff -up ./src/plumbing/transcoding.c.orig ./src/plumbing/transcoding.c
  2. --- ./src/plumbing/transcoding.c.orig 2019-01-12 09:58:47.000000000 +0100
  3. +++ ./src/plumbing/transcoding.c 2019-03-12 15:49:24.922314869 +0100
  4. @@ -1804,7 +1804,7 @@ transcoder_init_video(transcoder_t *t, s
  5. char *str, *token, *saveptr, codec_list[sizeof(tp->tp_src_vcodec)];
  6. int codec_match=0;
  7. - strncpy(codec_list, tp->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
  8. + memcpy(codec_list, tp->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
  9. tvhtrace(LS_TRANSCODE, "src_vcodec=\"%s\" ssc_type=%d (%s)\n",
  10. tp->tp_src_vcodec,
  11. @@ -2130,10 +2130,10 @@ transcoder_set_properties(streaming_targ
  12. transcoder_t *t = (transcoder_t *)st;
  13. transcoder_props_t *tp = &t->t_props;
  14. - strncpy(tp->tp_vcodec, props->tp_vcodec, sizeof(tp->tp_vcodec)-1);
  15. - strncpy(tp->tp_vcodec_preset, props->tp_vcodec_preset, sizeof(tp->tp_vcodec_preset)-1);
  16. - strncpy(tp->tp_acodec, props->tp_acodec, sizeof(tp->tp_acodec)-1);
  17. - strncpy(tp->tp_scodec, props->tp_scodec, sizeof(tp->tp_scodec)-1);
  18. + memcpy(tp->tp_vcodec, props->tp_vcodec, sizeof(tp->tp_vcodec)-1);
  19. + memcpy(tp->tp_vcodec_preset, props->tp_vcodec_preset, sizeof(tp->tp_vcodec_preset)-1);
  20. + memcpy(tp->tp_acodec, props->tp_acodec, sizeof(tp->tp_acodec)-1);
  21. + memcpy(tp->tp_scodec, props->tp_scodec, sizeof(tp->tp_scodec)-1);
  22. tp->tp_channels = props->tp_channels;
  23. tp->tp_vbitrate = props->tp_vbitrate;
  24. tp->tp_abitrate = props->tp_abitrate;
  25. @@ -2141,7 +2141,7 @@ transcoder_set_properties(streaming_targ
  26. memcpy(tp->tp_language, props->tp_language, 4);
  27. - strncpy(tp->tp_src_vcodec, props->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
  28. + memcpy(tp->tp_src_vcodec, props->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
  29. }