ffmpeg.c:3650: error: Null Dereference
  pointer `p` last assigned on line 3650 could be null and is dereferenced at line 3650, column 5.

ffmpeg.c:3635:1: start of procedure opt_streamid()
3633. 
3634. /* arg format is "output-stream-index:streamid-value". */
3635. static void opt_streamid(const char *opt, const char *arg)
      ^
3636. {
3637.     int idx;

ffmpeg.c:3641:5: 
3639.     char idx_str[16];
3640. 
3641.     strncpy(idx_str, arg, sizeof(idx_str));
          ^
3642.     idx_str[sizeof(idx_str)-1] = '\0';
3643.     p = strchr(idx_str, ':');

ffmpeg.c:3642:5: 
3640. 
3641.     strncpy(idx_str, arg, sizeof(idx_str));
3642.     idx_str[sizeof(idx_str)-1] = '\0';
          ^
3643.     p = strchr(idx_str, ':');
3644.     if (!p) {

ffmpeg.c:3643:5: 
3641.     strncpy(idx_str, arg, sizeof(idx_str));
3642.     idx_str[sizeof(idx_str)-1] = '\0';
3643.     p = strchr(idx_str, ':');
          ^
3644.     if (!p) {
3645.         fprintf(stderr,

ffmpeg.c:3644:10: Taking true branch
3642.     idx_str[sizeof(idx_str)-1] = '\0';
3643.     p = strchr(idx_str, ':');
3644.     if (!p) {
               ^
3645.         fprintf(stderr,
3646.                 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",

ffmpeg.c:3645:9: 
3643.     p = strchr(idx_str, ':');
3644.     if (!p) {
3645.         fprintf(stderr,
              ^
3646.                 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
3647.                 arg, opt);

ffmpeg.c:3648:9: Skipping av_exit(): empty list of specs
3646.                 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
3647.                 arg, opt);
3648.         av_exit(1);
              ^
3649.     }
3650.     *p++ = '\0';

ffmpeg.c:3650:5: 
3648.         av_exit(1);
3649.     }
3650.     *p++ = '\0';
          ^
3651.     idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, MAX_STREAMS-1);
3652.     streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);
